Mercurial > octave
diff src/DLD-FUNCTIONS/cellfun.cc @ 14360:97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
* __makeinfo__.m: Only remove space at beginning of new line for
docstrings from scripts/ directory where this is the convention.
* besselj.cc, betainc.cc, cellfun.cc, dot.cc, fftw.cc, filter.cc, find.cc,
gammainc.cc, gcd.cc, givens.cc, hex2num.cc, kron.cc, lu.cc, max.cc, qr.cc,
quadcc.cc, qz.cc, regexp.cc, strfind.cc, sub2ind.cc, syl.cc, time.cc,
typecast.cc, urlwrite.cc, data.cc, dirfns.cc, file-io.cc, help.cc,
load-path.cc, mappers.cc, oct-parse.yy, ov-base.cc, ov-cell.cc, ov-struct.cc,
ov.cc, pr-output.cc, pt-mat.cc, strfns.cc, syscalls.cc, variables.cc:
Improve appearance of docstring spacing of @example code.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 13 Feb 2012 07:42:56 -0800 |
parents | 72c96de7a403 |
children | 8de863b7126b |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/cellfun.cc Mon Feb 13 07:38:23 2012 -0800 +++ b/src/DLD-FUNCTIONS/cellfun.cc Mon Feb 13 07:42:56 2012 -0800 @@ -303,7 +303,7 @@ @example\n\ @group\n\ cellfun (\"atan2\", @{1, 0@}, @{0, 1@})\n\ - @result{}ans = [1.57080 0.00000]\n\ + @result{} [ 1.57080 0.00000 ]\n\ @end group\n\ @end example\n\ \n\ @@ -330,7 +330,7 @@ the input arguments. Input arguments that are singleton (1x1) cells will be\n\ automatically expanded to the size of the other arguments.\n\ \n\ -If the parameter 'UniformOutput' is set to true (the default), then the\n\ +If the parameter \"UniformOutput\" is set to true (the default), then the\n\ function must return scalars which will be concatenated into the return\n\ array(s). If 'UniformOutput' is false, the outputs are concatenated into a\n\ cell array (or cell arrays). For example:\n\ @@ -338,8 +338,8 @@ @example\n\ @group\n\ cellfun (\"tolower\", @{\"Foo\", \"Bar\", \"FooBar\"@},\n\ - \"UniformOutput\",false)\n\ -@result{} ans = @{\"foo\", \"bar\", \"foobar\"@}\n\ + \"UniformOutput\", false)\n\ +@result{} @{\"foo\", \"bar\", \"foobar\"@}\n\ @end group\n\ @end example\n\ \n\ @@ -360,8 +360,8 @@ @example\n\ @group\n\ function y = foo (s, x), y = NaN; endfunction\n\ -cellfun (\"factorial\", @{-1,2@}, 'ErrorHandler', @@foo)\n\ -@result{} ans = [NaN 2]\n\ +cellfun (\"factorial\", @{-1,2@}, \"ErrorHandler\", @@foo)\n\ +@result{} [NaN 2]\n\ @end group\n\ @end example\n\ \n\ @@ -1042,7 +1042,7 @@ @example\n\ @group\n\ arrayfun (@@atan2, [1, 0], [0, 1])\n\ -@result{} ans = [1.5708 0.0000]\n\ + @result{} [ 1.5708 0.0000 ]\n\ @end group\n\ @end example\n\ \n\ @@ -1056,12 +1056,12 @@ @example\n\ @group\n\ arrayfun (@@(x,y) x:y, \"abc\", \"def\", \"UniformOutput\", false)\n\ -@result{} ans =\n\ - @{\n\ - [1,1] = abcd\n\ - [1,2] = bcde\n\ - [1,3] = cdef\n\ - @}\n\ +@result{}\n\ + @{\n\ + [1,1] = abcd\n\ + [1,2] = bcde\n\ + [1,3] = cdef\n\ + @}\n\ @end group\n\ @end example\n\ \n\ @@ -1075,18 +1075,18 @@ @result{}\n\ A =\n\ @{\n\ - [1,1] = 1\n\ - [2,1] = [](0x0)\n\ + [1,1] = 1\n\ + [2,1] = [](0x0)\n\ @}\n\ B =\n\ @{\n\ - [1,1] = 1\n\ - [2,1] = [](0x0)\n\ + [1,1] = 1\n\ + [2,1] = [](0x0)\n\ @}\n\ C =\n\ @{\n\ - [1,1] = 10\n\ - [2,1] = [](0x0)\n\ + [1,1] = 10\n\ + [2,1] = [](0x0)\n\ @}\n\ @end group\n\ @end example\n\ @@ -1115,11 +1115,11 @@ @group\n\ function y = ferr (s, x), y = \"MyString\"; endfunction\n\ arrayfun (@@str2num, [1234],\n\ - \"UniformOutput\", false, \"ErrorHandler\", @@ferr)\n\ -@result{} ans =\n\ - @{\n\ + \"UniformOutput\", false, \"ErrorHandler\", @@ferr)\n\ +@result{}\n\ + @{\n\ [1,1] = MyString\n\ - @}\n\ + @}\n\ @end group\n\ @end example\n\ \n\ @@ -1810,24 +1810,24 @@ \n\ @example\n\ @group\n\ -num2cell([1,2;3,4])\n\ - @result{} ans =\n\ - @{\n\ - [1,1] = 1\n\ - [2,1] = 3\n\ - [1,2] = 2\n\ - [2,2] = 4\n\ - @}\n\ -num2cell([1,2;3,4],1)\n\ - @result{} ans =\n\ - @{\n\ - [1,1] =\n\ - 1\n\ - 3\n\ - [1,2] =\n\ - 2\n\ - 4\n\ - @}\n\ +num2cell ([1,2;3,4])\n\ + @result{}\n\ + @{\n\ + [1,1] = 1\n\ + [2,1] = 3\n\ + [1,2] = 2\n\ + [2,2] = 4\n\ + @}\n\ +num2cell ([1,2;3,4],1)\n\ + @result{}\n\ + @{\n\ + [1,1] =\n\ + 1\n\ + 3\n\ + [1,2] =\n\ + 2\n\ + 4\n\ + @}\n\ @end group\n\ @end example\n\ \n\ @@ -2149,25 +2149,26 @@ An example of the use of mat2cell is\n\ \n\ @example\n\ -mat2cell (reshape(1:16,4,4),[3,1],[3,1])\n\ -@result{} @{\n\ - [1,1] =\n\ +mat2cell (reshape (1:16,4,4), [3,1], [3,1])\n\ +@result{}\n\ +@{\n\ + [1,1] =\n\ \n\ - 1 5 9\n\ - 2 6 10\n\ - 3 7 11\n\ -\n\ - [2,1] =\n\ + 1 5 9\n\ + 2 6 10\n\ + 3 7 11\n\ \n\ - 4 8 12\n\ + [2,1] =\n\ \n\ - [1,2] =\n\ + 4 8 12\n\ +\n\ + [1,2] =\n\ \n\ - 13\n\ - 14\n\ - 15\n\ + 13\n\ + 14\n\ + 15\n\ \n\ - [2,2] = 16\n\ + [2,2] = 16\n\ @}\n\ @end example\n\ @seealso{num2cell, cell2mat}\n\ @@ -2430,10 +2431,10 @@ \n\ @example\n\ @group\n\ - Y = cell (size (X));\n\ - for i = 1:numel (X)\n\ - Y@{i@} = X@{i@}(varargin@{:@});\n\ - endfor\n\ +Y = cell (size (X));\n\ +for i = 1:numel (X)\n\ + Y@{i@} = X@{i@}(varargin@{:@});\n\ +endfor\n\ @end group\n\ @end example\n\ @seealso{cellslices, cellfun}\n\