# HG changeset patch # User Rik # Date 1487723059 28800 # Node ID 54404cc329034b8390dd7918f2e0e8d03dc170fe # Parent 0842b119dc1bf1bc5f7bb711446c0556d4d4f099 doc: Fix differences between example code and run time results (bug #50282). * container.txi: Fix example of comma-separated lists. * chop.m: Add 'format long' to example code. diff -r 0842b119dc1b -r 54404cc32903 doc/interpreter/container.txi --- a/doc/interpreter/container.txi Sun Feb 19 20:44:38 2017 +0100 +++ b/doc/interpreter/container.txi Tue Feb 21 16:24:19 2017 -0800 @@ -1033,21 +1033,27 @@ @example @group -in@{1@} = [10, 20, 30, 40, 50, 60, 70, 80, 90]; +in@{1@} = [10, 20, 30]; in@{2@} = inf; in@{3@} = "last"; in@{4@} = "first"; out = cell (4, 1); -[out@{1:3@}] = find (in@{1 : 3@}); -[out@{4:6@}] = find (in@{[1, 2, 4]@}) +[out@{1:3@}] = in@{1 : 3@}; +[out@{4:6@}] = in@{[1, 2, 4]@}) @result{} out = @{ - [1,1] = 1 - [2,1] = 9 - [3,1] = 90 - [4,1] = 1 - [3,1] = 1 - [4,1] = 10 + [1,1] = + + 10 20 30 + + [2,1] = Inf + [3,1] = last + [4,1] = + + 10 20 30 + + [5,1] = Inf + [6,1] = first @} @end group @end example diff -r 0842b119dc1b -r 54404cc32903 scripts/general/chop.m --- a/scripts/general/chop.m Sun Feb 19 20:44:38 2017 +0100 +++ b/scripts/general/chop.m Tue Feb 21 16:24:19 2017 -0800 @@ -25,6 +25,7 @@ ## ## @example ## @group +## format long ## chop (-pi, 5, 10) ## @result{} -3.14200000000000 ## chop (-pi, 5, 5)