Mercurial > hg > octave-terminal
changeset 14327:4d917a6a858b stable
doc: Use Octave coding conventions in @example blocks of docstrings.
* accumarray.m, accumdim.m, bar.m, base2dec.m, bincoeff.m, bitcmp.m, bitset.m,
celldisp.m, chop.m, clabel.m, cloglog.m, colon.m, compass.m, computer.m,
contour3.m, contourc.m, corr.m, cstrcat.m, ctime.m, cylinder.m, date.m,
dec2base.m, demo.m, dir.m, dlmwrite.m, expm.m, ezcontourf.m, ezcontour.m,
ezmeshc.m, ezmesh.m, ezplot.m, ezsurfc.m, ezsurf.m, feather.m, findobj.m,
flipdim.m, fplot.m, genvarname.m, getfield.m, hankel.m, hilb.m, hist.m,
idivide.m, index.m, int2str.m, interp1.m, is_leap_year.m, ismember.m,
isocolors.m, isonormals.m, isosurface.m, kurtosis.m, legendre.m, linkprop.m,
logit.m, logm.m, __makeinfo__.m, __marching_cube__.m, median.m, mkoctfile.m,
moment.m, mpoles.m, orderfields.m, pcg.m, pcr.m, plot3.m, plotmatrix.m,
polyaffine.m, polygcd.m, poly.m, polyout.m, print.m, qp.m, quadgk.m, qzhess.m,
randi.m, rat.m, refreshdata.m, residue.m, rose.m, rot90.m, saveas.m, saveobj.m,
shiftdim.m, skewness.m, spaugment.m, spdiags.m, sqp.m, stem.m, str2num.m,
strcat.m, strjust.m, strread.m, strsplit.m, structfun.m, subplot.m,
subsindex.m, substruct.m, surfl.m, surfnorm.m, svds.m, uimenu.m, union.m,
voronoi.m, warning_ids.m, wblpdf.m: Use Octave coding conventions in
@example blocks of docstrings.
line wrap: on
line diff
--- a/scripts/general/accumarray.m +++ b/scripts/general/accumarray.m @@ -68,11 +68,11 @@ ## @var{x} = [91, 92, 90, 92, 90, 89, 91, 89, 90, 100, 100, 100]; ## [@var{u}, ~, @var{j}] = unique (@var{x}); ## [accumarray(@var{j}', 1), @var{u}'] -## @result{} 2 89 -## 3 90 -## 2 91 -## 2 92 -## 3 100 +## @result{} 2 89 +## 3 90 +## 2 91 +## 2 92 +## 3 100 ## @end group ## @end example ## @@ -87,7 +87,7 @@ ## 2, 1, 2; ## 2, 3, 2], 101:105) ## @result{} ans(:,:,1) = [101, 0, 0; 0, 0, 0] -## ans(:,:,2) = [0, 0, 0; 206, 0, 208] +## @result{} ans(:,:,2) = [0, 0, 0; 206, 0, 208] ## @end group ## @end example ##
--- a/scripts/general/accumdim.m +++ b/scripts/general/accumdim.m @@ -50,7 +50,7 @@ ## -12, 2, 8; ## -10, 9, -3; ## -5, -3, -13]) -## @result{} ans = [-10,-11,-1;-15,-3,5] +## @result{} [-10,-11,-1;-15,-3,5] ## @end group ## @end example ##
--- a/scripts/general/bitcmp.m +++ b/scripts/general/bitcmp.m @@ -23,12 +23,12 @@ ## ## @example ## @group -## bitcmp(7,4) -## @result{} 8 -## dec2bin(11) -## @result{} 1011 -## dec2bin(bitcmp(11, 6)) -## @result{} 110100 +## bitcmp (7,4) +## @result{} 8 +## dec2bin (11) +## @result{} 1011 +## dec2bin (bitcmp (11, 6)) +## @result{} 110100 ## @end group ## @end example ## @seealso{bitand, bitor, bitxor, bitset, bitget, bitcmp, bitshift, bitmax}
--- a/scripts/general/bitset.m +++ b/scripts/general/bitset.m @@ -26,7 +26,7 @@ ## @example ## @group ## dec2bin (bitset (10, 1)) -## @result{} 1011 +## @result{} 1011 ## @end group ## @end example ## @seealso{bitand, bitor, bitxor, bitget, bitcmp, bitshift, bitmax}
--- a/scripts/general/celldisp.m +++ b/scripts/general/celldisp.m @@ -25,16 +25,16 @@ ## @example ## @group ## c = @{1, 2, @{31, 32@}@}; -## celldisp(c, "b") -## @result{} -## b@{1@} = -## 1 -## b@{2@} = -## 2 -## b@{3@}@{1@} = -## 31 -## b@{3@}@{2@} = -## 32 +## celldisp (c, "b") +## @result{} +## b@{1@} = +## 1 +## b@{2@} = +## 2 +## b@{3@}@{1@} = +## 31 +## b@{3@}@{2@} = +## 32 ## @end group ## @end example ##
--- a/scripts/general/chop.m +++ b/scripts/general/chop.m @@ -25,9 +25,9 @@ ## @example ## @group ## chop (-pi, 5, 10) -## @result{} -3.14200000000000 +## @result{} -3.14200000000000 ## chop (-pi, 5, 5) -## @result{} -3.14150000000000 +## @result{} -3.14150000000000 ## @end group ## @end example ## @end deftypefn
--- a/scripts/general/colon.m +++ b/scripts/general/colon.m @@ -24,8 +24,8 @@ ## ## @example ## @group -## a = myclass (@dots{}) -## b = myclass (@dots{}) +## a = myclass (@dots{}); +## b = myclass (@dots{}); ## c = a : b ## @end group ## @end example
--- a/scripts/general/flipdim.m +++ b/scripts/general/flipdim.m @@ -27,8 +27,8 @@ ## @example ## @group ## flipdim ([1, 2; 3, 4], 2) -## @result{} 2 1 -## 4 3 +## @result{} 2 1 +## 4 3 ## @end group ## @end example ## @seealso{fliplr, flipud, rot90, rotdim}
--- a/scripts/general/genvarname.m +++ b/scripts/general/genvarname.m @@ -30,7 +30,7 @@ ## @group ## x = 3.141; ## genvarname ("x", who ()) -## @result{} x1 +## @result{} x1 ## @end group ## @end example ## @@ -40,11 +40,11 @@ ## @example ## @group ## genvarname (@{"foo", "foo"@}) -## @result{} -## @{ -## [1,1] = foo -## [1,2] = foo1 -## @} +## @result{} +## @{ +## [1,1] = foo +## [1,2] = foo1 +## @} ## @end group ## @end example ## @@ -55,8 +55,8 @@ ## @example ## @group ## name = genvarname ("x"); -## eval([name " = 42"]); -## @result{} x = 42 +## eval ([name " = 42"]); +## @result{} x = 42 ## @end group ## @end example ## @@ -68,13 +68,12 @@ ## for i = 1:3 ## x.(genvarname ("a", fieldnames (x))) = i; ## endfor -## @result{} -## x = -## @{ -## a = 1 -## a1 = 2 -## a2 = 3 -## @} +## @result{} x = +## @{ +## a = 1 +## a1 = 2 +## a2 = 3 +## @} ## @end group ## @end example ##
--- a/scripts/general/idivide.m +++ b/scripts/general/idivide.m @@ -52,13 +52,13 @@ ## @example ## @group ## idivide (int8 ([-3, 3]), int8 (4), "fix") -## @result{} int8 ([0, 0]) +## @result{} int8 ([0, 0]) ## idivide (int8 ([-3, 3]), int8 (4), "round") -## @result{} int8 ([-1, 1]) +## @result{} int8 ([-1, 1]) ## idivide (int8 ([-3, 3]), int8 (4), "floor") -## @result{} int8 ([-1, 0]) +## @result{} int8 ([-1, 0]) ## idivide (int8 ([-3, 3]), int8 (4), "ceil") -## @result{} int8 ([0, 1]) +## @result{} int8 ([0, 1]) ## @end group ## @end example ##
--- a/scripts/general/int2str.m +++ b/scripts/general/int2str.m @@ -23,7 +23,6 @@ ## ## @example ## @group -## ## int2str (123) ## @result{} "123" ##
--- a/scripts/general/interp1.m +++ b/scripts/general/interp1.m @@ -87,7 +87,7 @@ ## near = interp1 (xp, yp, xf, "nearest"); ## plot (xf, yf, "r", xf, lin, "g", xf, spl, "b", ## xf, cub, "c", xf, near, "m", xp, yp, "r*"); -## legend ("original", "linear", "spline", "cubic", "nearest") +## legend ("original", "linear", "spline", "cubic", "nearest"); ## @end group ## @end example ##
--- a/scripts/general/quadgk.m +++ b/scripts/general/quadgk.m @@ -42,7 +42,7 @@ ## weaken the singularities. For example: ## ## @example -## quadgk(@@(x) 1 ./ (sqrt (x) .* (x + 1)), 0, Inf) +## quadgk (@@(x) 1 ./ (sqrt (x) .* (x + 1)), 0, Inf) ## @end example ## ## @noindent @@ -89,7 +89,7 @@ ## computation, or both. For example, ## ## @example -## quadgk (@@(x) abs (1 - x.^2), 0, 2, 'Waypoints', 1) +## quadgk (@@(x) abs (1 - x.^2), 0, 2, "Waypoints", 1) ## @end example ## ## @noindent
--- a/scripts/general/randi.m +++ b/scripts/general/randi.m @@ -40,7 +40,7 @@ ## The following example returns 150 integers in the range 1-10. ## ## @example -## ri = randi (10, 150, 1); +## ri = randi (10, 150, 1) ## @end example ## ## Implementation Note: @code{randi} relies internally on @code{rand} which
--- a/scripts/general/rat.m +++ b/scripts/general/rat.m @@ -25,9 +25,9 @@ ## ## @example ## @group -## rat(pi) = 3 + 1/(7 + 1/16) = 355/113 -## rat(e) = 3 + 1/(-4 + 1/(2 + 1/(5 + 1/(-2 + 1/(-7))))) -## = 1457/536 +## rat (pi) = 3 + 1/(7 + 1/16) = 355/113 +## rat (e) = 3 + 1/(-4 + 1/(2 + 1/(5 + 1/(-2 + 1/(-7))))) +## = 1457/536 ## @end group ## @end example ##
--- a/scripts/general/rot90.m +++ b/scripts/general/rot90.m @@ -28,8 +28,8 @@ ## @example ## @group ## rot90 ([1, 2; 3, 4], -1) -## @result{} 3 1 -## 4 2 +## @result{} 3 1 +## 4 2 ## @end group ## @end example ##
--- a/scripts/general/saveobj.m +++ b/scripts/general/saveobj.m @@ -30,7 +30,7 @@ ## function b = saveobj (a) ## b = a; ## if (isempty (b.field)) -## b.field = initfield(b); +## b.field = initfield (b); ## endif ## endfunction ## @end group
--- a/scripts/general/shiftdim.m +++ b/scripts/general/shiftdim.m @@ -36,12 +36,12 @@ ## @group ## x = ones (1, 2, 3); ## size (shiftdim (x, -1)) -## @result{} [1, 1, 2, 3] +## @result{} [1, 1, 2, 3] ## size (shiftdim (x, 1)) -## @result{} [2, 3] -## [b, ns] = shiftdim (x); -## @result{} b = [1, 1, 1; 1, 1, 1] -## @result{} ns = 1 +## @result{} [2, 3] +## [b, ns] = shiftdim (x) +## @result{} b = [1, 1, 1; 1, 1, 1] +## @result{} ns = 1 ## @end group ## @end example ## @seealso {reshape, permute, ipermute, circshift, squeeze}
--- a/scripts/general/structfun.m +++ b/scripts/general/structfun.m @@ -47,7 +47,7 @@ ## s.name2 = "Jill Jones"; ## structfun (@@(x) regexp (x, '(\w+)$', "matches")@{1@}, s, ## "UniformOutput", false) -## @result{} +## @result{} ## @{ ## name1 = Smith ## name2 = Jones
--- a/scripts/general/subsindex.m +++ b/scripts/general/subsindex.m @@ -28,7 +28,7 @@ ## @example ## @group ## function b = myclass (a) -## b = class (struct ("a", a), "myclass"); +## b = class (struct ("a", a), "myclass"); ## endfunction ## @end group ## @end example @@ -39,7 +39,7 @@ ## @example ## @group ## function idx = subsindex (a) -## idx = double (a.a) - 1.0; +## idx = double (a.a) - 1.0; ## endfunction ## @end group ## @end example
--- a/scripts/geometry/voronoi.m +++ b/scripts/geometry/voronoi.m @@ -42,12 +42,12 @@ ## ## @example ## @group -## x = rand (10, 1); -## y = rand (size (x)); -## h = convhull (x, y); -## [vx, vy] = voronoi (x, y); -## plot (vx, vy, "-b", x, y, "o", x(h), y(h), "-g") -## legend ("", "points", "hull"); +## x = rand (10, 1); +## y = rand (size (x)); +## h = convhull (x, y); +## [vx, vy] = voronoi (x, y); +## plot (vx, vy, "-b", x, y, "o", x(h), y(h), "-g"); +## legend ("", "points", "hull"); ## @end group ## @end example ##
--- a/scripts/help/__makeinfo__.m +++ b/scripts/help/__makeinfo__.m @@ -41,7 +41,7 @@ ## will be expanded to the text ## ## @example -## See also: arg1, arg2@, ... +## See also: arg1, arg2, ... ## @end example ## ## @noindent
--- a/scripts/io/dlmwrite.m +++ b/scripts/io/dlmwrite.m @@ -40,6 +40,7 @@ ## ## In addition, the following keyword value pairs may appear at the end ## of the argument list: +## ## @table @asis ## @item "append" ## Either @samp{"on"} or @samp{"off"}. See @samp{"-append"} above. @@ -49,9 +50,9 @@ ## ## @item "newline" ## The character(s) to use to separate each row. Three special cases -## exist for this option. @samp{"unix"} is changed into '\n', -## @samp{"pc"} is changed into '\r\n', and @samp{"mac"} is changed -## into '\r'. Other values for this option are kept as is. +## exist for this option. @samp{"unix"} is changed into "\n", +## @samp{"pc"} is changed into "\r\n", and @samp{"mac"} is changed +## into "\r". Other values for this option are kept as is. ## ## @item "roffset" ## See @var{r} above.
--- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -34,6 +34,7 @@ ## The string @var{format} describes how the words in @var{str} should be ## parsed. ## It may contain any combination of the following specifiers: +## ## @table @code ## @item %s ## The word is parsed as a string. @@ -84,6 +85,7 @@ ## ## Optional numeric argument @var{format_repeat} can be used for ## limiting the number of items read: +## ## @table @asis ## @item -1 ## (default) read all of the string until the end. @@ -91,7 +93,6 @@ ## @item N ## Read N times @var{nargout} items. 0 (zero) is an acceptable ## value for @var{format_repeat}. -## ## @end table ## ## The behavior of @code{strread} can be changed via property-value
--- a/scripts/linear-algebra/expm.m +++ b/scripts/linear-algebra/expm.m @@ -28,7 +28,7 @@ ## @ifnottex ## ## @example -## expm(A) = I + A + A^2/2! + A^3/3! + @dots{} +## expm (A) = I + A + A^2/2! + A^3/3! + @dots{} ## @end example ## ## @end ifnottex
--- a/scripts/linear-algebra/logm.m +++ b/scripts/linear-algebra/logm.m @@ -26,7 +26,7 @@ ## implementation utilizes a Pad@'e approximant and the identity ## ## @example -## logm(@var{A}) = 2^k * logm(@var{A}^(1 / 2^k)) +## logm (@var{A}) = 2^k * logm (@var{A}^(1 / 2^k)) ## @end example ## ## The optional argument @var{opt_iters} is the maximum number of square roots
--- a/scripts/linear-algebra/qzhess.m +++ b/scripts/linear-algebra/qzhess.m @@ -37,8 +37,8 @@ ## The Hessenberg-triangular decomposition is the first step in ## Moler and Stewart's QZ@tie{}decomposition algorithm. ## -## Algorithm taken from Golub and Van Loan, @cite{Matrix Computations, 2nd -## edition}. +## Algorithm taken from Golub and Van Loan, +## @cite{Matrix Computations, 2nd edition}. ## @end deftypefn ## Author: A. S. Hodel <scotte@eng.auburn.edu>
--- a/scripts/miscellaneous/bincoeff.m +++ b/scripts/miscellaneous/bincoeff.m @@ -42,7 +42,7 @@ ## @example ## @group ## bincoeff (5, 2) -## @result{} 10 +## @result{} 10 ## @end group ## @end example ##
--- a/scripts/miscellaneous/computer.m +++ b/scripts/miscellaneous/computer.m @@ -27,10 +27,10 @@ ## @example ## @group ## computer () -## @print{} i586-pc-linux-gnu +## @print{} i586-pc-linux-gnu ## ## x = computer () -## @result{} x = "i586-pc-linux-gnu" +## @result{} x = "i586-pc-linux-gnu" ## @end group ## @end example ##
--- a/scripts/miscellaneous/dir.m +++ b/scripts/miscellaneous/dir.m @@ -33,7 +33,7 @@ ## @end example ## ## @noindent -## in which @code{statinfo} is the structure returned from @code{stat}. +## where @code{statinfo} is the structure returned from @code{stat}. ## ## If @var{directory} is not a directory, return information about the ## named @var{filename}. @var{directory} may be a list of directories @@ -41,7 +41,7 @@ ## which will be expanded with glob. ## ## Note that for symbolic links, @code{dir} returns information about -## the file that a symbolic link points to instead of the link itself. +## the file that the symbolic link points to instead of the link itself. ## However, if the link points to a nonexistent file, @code{dir} returns ## information about the link. ## @seealso{ls, stat, lstat, readdir, glob, filesep}
--- a/scripts/miscellaneous/getfield.m +++ b/scripts/miscellaneous/getfield.m @@ -25,7 +25,7 @@ ## @group ## ss(1,2).fd(3).b = 5; ## getfield (ss, @{1,2@}, "fd", @{3@}, "b") -## @result{} ans = 5 +## @result{} 5 ## @end group ## @end example ## @@ -36,7 +36,7 @@ ## @group ## i1 = @{1,2@}; i2 = "fd"; i3 = @{3@}; i4= "b"; ## ss(i1@{:@}).(i2)(i3@{:@}).(i4) -## @result{} ans = 5 +## @result{} 5 ## ## @end group ## @end example
--- a/scripts/miscellaneous/mkoctfile.m +++ b/scripts/miscellaneous/mkoctfile.m @@ -124,16 +124,16 @@ ## ## @example ## @group -## .c C source -## .cc C++ source -## .C C++ source -## .cpp C++ source -## .f Fortran source (fixed form) -## .F Fortran source (fixed form) -## .f90 Fortran source (free form) -## .F90 Fortran source (free form) -## .o object file -## .a library file +## .c C source +## .cc C++ source +## .C C++ source +## .cpp C++ source +## .f Fortran source (fixed form) +## .F Fortran source (fixed form) +## .f90 Fortran source (free form) +## .F90 Fortran source (free form) +## .o object file +## .a library file ## @end group ## @end example ##
--- a/scripts/miscellaneous/orderfields.m +++ b/scripts/miscellaneous/orderfields.m @@ -38,7 +38,7 @@ ## @example ## @group ## s = struct("d", 4, "b", 2, "a", 1, "c", 3); -## t1 = orderfields(s) +## t1 = orderfields (s) ## @result{} t1 = ## @{ ## a = 1 @@ -49,7 +49,7 @@ ## @end group ## @group ## t = struct("d", @{@}, "c", @{@}, "b", "a", @{@}); -## t2 = orderfields(s, t) +## t2 = orderfields (s, t) ## @result{} t2 = ## @{ ## d = 4 @@ -59,7 +59,7 @@ ## @} ## @end group ## @group -## t3 = orderfields(s, [3, 2, 4, 1]); +## t3 = orderfields (s, [3, 2, 4, 1]); ## @result{} t3 = ## @{ ## a = 1 @@ -69,18 +69,19 @@ ## @} ## @end group ## @group -## [t4, p] = orderfields(s, @{"d", "c", "b", "a"@}) -## @result{} t4 = @{ +## [t4, p] = orderfields (s, @{"d", "c", "b", "a"@}) +## @result{} t4 = +## @{ ## d = 4 ## c = 3 ## b = 2 ## a = 1 ## @} -## p = -## 1 -## 4 -## 2 -## 3 +## p = +## 1 +## 4 +## 2 +## 3 ## @end group ## @end example ##
--- a/scripts/miscellaneous/substruct.m +++ b/scripts/miscellaneous/substruct.m @@ -24,7 +24,7 @@ ## ## @example ## @group -## idx = substruct("()", @{3, ":"@}) +## idx = substruct ("()", @{3, ":"@}) ## @result{} ## idx = ## @{ @@ -36,9 +36,8 @@ ## @} ## @} ## x = [1, 2, 3; 4, 5, 6; 7, 8, 9]; -## subsref(x, idx) -## @result{} ans = -## 7 8 9 +## subsref (x, idx) +## @result{} 7 8 9 ## @end group ## @end example ## @seealso{subsref, subsasgn}
--- a/scripts/miscellaneous/warning_ids.m +++ b/scripts/miscellaneous/warning_ids.m @@ -65,7 +65,7 @@ ## ## @example ## @group -## while (c = getc()) +## while (c = getc ()) ## @dots{} ## @end group ## @end example @@ -93,7 +93,7 @@ ## ## @example ## @group -## while ((c = getc())) +## while ((c = getc ())) ## @dots{} ## @end group ## @end example @@ -213,7 +213,7 @@ ## @example ## @group ## [ "f", 111, 111 ] -## @result{} "foo" +## @result{} "foo" ## @end group ## @end example ## @@ -231,7 +231,7 @@ ## ## @example ## @group -## do_braindead_shortcircuit_evaluation(1) +## do_braindead_shortcircuit_evaluation (1) ## @end group ## @end example ## @@ -295,7 +295,7 @@ ## @example ## @group ## "abc" + 0 -## @result{} 97 98 99 +## @result{} 97 98 99 ## @end group ## @end example ##
--- a/scripts/optimization/qp.m +++ b/scripts/optimization/qp.m @@ -33,8 +33,8 @@ ## ## @example ## @group -## min 0.5 x'*H*x + x'*q -## x +## min 0.5 x'*H*x + x'*q +## x ## @end group ## @end example ## @@ -49,9 +49,9 @@ ## ## @example ## @group -## A*x = b -## lb <= x <= ub -## A_lb <= A_in*x <= A_ub +## A*x = b +## lb <= x <= ub +## A_lb <= A_in*x <= A_ub ## @end group ## @end example ##
--- a/scripts/optimization/sqp.m +++ b/scripts/optimization/sqp.m @@ -33,8 +33,8 @@ ## ## @example ## @group -## min phi (x) -## x +## min phi (x) +## x ## @end group ## @end example ## @@ -49,9 +49,9 @@ ## ## @example ## @group -## g(x) = 0 -## h(x) >= 0 -## lb <= x <= ub +## g(x) = 0 +## h(x) >= 0 +## lb <= x <= ub ## @end group ## @end example ## @@ -102,9 +102,9 @@ ## ## @example ## @group -## [ d f(x) d f(x) d f(x) ] -## transpose ( [ ------ ----- ... ------ ] ) -## [ dx_1 dx_2 dx_N ] +## [ d f(x) d f(x) d f(x) ] +## transpose ( [ ------ ----- ... ------ ] ) +## [ dx_1 dx_2 dx_N ] ## @end group ## @end example ## @@ -155,7 +155,7 @@ ## endfunction ## ## function obj = phi (x) -## obj = exp(prod(x)) - 0.5*(x(1)^3+x(2)^3+1)^2; +## obj = exp (prod (x)) - 0.5*(x(1)^3+x(2)^3+1)^2; ## endfunction ## ## x0 = [-1.8; 1.7; 1.9; -0.8; -0.8];
--- a/scripts/plot/bar.m +++ b/scripts/plot/bar.m @@ -66,8 +66,8 @@ ## ## @example ## @group -## bar (rand(10,3)) -## colormap (summer ()) +## bar (rand (10, 3)); +## colormap (summer (64)); ## @end group ## @end example ## @@ -77,7 +77,7 @@ ## ## @example ## @group -## h = bar (rand(10,3)) +## h = bar (rand (10, 3)); ## set (h(1), "facecolor", "r") ## set (h(2), "facecolor", "g") ## set (h(3), "facecolor", "b")
--- a/scripts/plot/clabel.m +++ b/scripts/plot/clabel.m @@ -48,8 +48,8 @@ ## ## @example ## @group -## [c, h] = contour (peaks(), -4 : 6); -## clabel (c, h, -4 : 2 : 6, 'fontsize', 12); +## [c, h] = contour (peaks (), -4 : 6); +## clabel (c, h, -4:2:6, "fontsize", 12); ## @end group ## @end example ##
--- a/scripts/plot/compass.m +++ b/scripts/plot/compass.m @@ -37,7 +37,7 @@ ## @example ## @group ## a = toeplitz ([1;randn(9,1)], [1,randn(1,9)]); -## compass (eig (a)) +## compass (eig (a)); ## @end group ## @end example ##
--- a/scripts/plot/contour3.m +++ b/scripts/plot/contour3.m @@ -34,8 +34,8 @@ ## @group ## contour3 (peaks (19)); ## hold on -## surface (peaks (19), "facecolor", "none", "EdgeColor", "black") -## colormap hot +## surface (peaks (19), "facecolor", "none", "EdgeColor", "black"); +## colormap hot; ## @end group ## @end example ##
--- a/scripts/plot/contourc.m +++ b/scripts/plot/contourc.m @@ -50,9 +50,8 @@ ## y = x; ## z = x' * y; ## contourc (x, y, z, 2:3) -## @result{} 2.0000 2.0000 1.0000 3.0000 1.5000 2.0000 -## 2.0000 1.0000 2.0000 2.0000 2.0000 1.5000 -## +## @result{} 2.0000 2.0000 1.0000 3.0000 1.5000 2.0000 +## 2.0000 1.0000 2.0000 2.0000 2.0000 1.5000 ## @end group ## @end example ## @seealso{contour}
--- a/scripts/plot/cylinder.m +++ b/scripts/plot/cylinder.m @@ -38,9 +38,9 @@ ## ## @example ## @group -## [x, y, z] = cylinder (10:-1:0,50); +## [x, y, z] = cylinder (10:-1:0, 50); ## surf (x, y, z); -## title ("a cone") +## title ("a cone"); ## @end group ## @end example ## @seealso{sphere}
--- a/scripts/plot/ezcontour.m +++ b/scripts/plot/ezcontour.m @@ -39,7 +39,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezcontour (f, [-3, 3]); ## @end group ## @end example
--- a/scripts/plot/ezcontourf.m +++ b/scripts/plot/ezcontourf.m @@ -39,7 +39,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezcontourf (f, [-3, 3]); ## @end group ## @end example
--- a/scripts/plot/ezmesh.m +++ b/scripts/plot/ezmesh.m @@ -49,7 +49,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezmesh (f, [-3, 3]); ## @end group ## @end example
--- a/scripts/plot/ezmeshc.m +++ b/scripts/plot/ezmeshc.m @@ -50,7 +50,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezmeshc (f, [-3, 3]); ## @end group ## @end example
--- a/scripts/plot/ezplot.m +++ b/scripts/plot/ezplot.m @@ -35,7 +35,7 @@ ## < 2*pi} with 60 by 60 in the mesh. For example: ## ## @example -## ezplot (@@(@var{x}, @var{y}) @var{x} .^ 2 - @var{y} .^ 2 - 1) +## ezplot (@@(@var{x}, @var{y}) @var{x}.^2 - @var{y}.^2 - 1) ## @end example ## ## If two functions are passed as strings, inline functions or function
--- a/scripts/plot/ezsurf.m +++ b/scripts/plot/ezsurf.m @@ -49,7 +49,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezsurf (f, [-3, 3]); ## @end group ## @end example @@ -58,9 +58,9 @@ ## ## @example ## @group -## fx = @@(s,t) cos (s) .* cos(t); -## fy = @@(s,t) sin (s) .* cos(t); -## fz = @@(s,t) sin(t); +## fx = @@(s,t) cos (s) .* cos (t); +## fy = @@(s,t) sin (s) .* cos (t); +## fz = @@(s,t) sin (t); ## ezsurf (fx, fy, fz, [-pi, pi, -pi/2, pi/2], 20); ## @end group ## @end example
--- a/scripts/plot/ezsurfc.m +++ b/scripts/plot/ezsurfc.m @@ -50,7 +50,7 @@ ## ## @example ## @group -## f = @@(x,y) sqrt(abs(x .* y)) ./ (1 + x.^2 + y.^2); +## f = @@(x,y) sqrt (abs (x .* y)) ./ (1 + x.^2 + y.^2); ## ezsurfc (f, [-3, 3]); ## @end group ## @end example
--- a/scripts/plot/feather.m +++ b/scripts/plot/feather.m @@ -36,8 +36,8 @@ ## ## @example ## @group -## phi = [0 : 15 : 360] * pi / 180; -## feather (sin (phi), cos (phi)) +## phi = [0 : 15 : 360] * pi/180; +## feather (sin (phi), cos (phi)); ## @end group ## @end example ##
--- a/scripts/plot/findobj.m +++ b/scripts/plot/findobj.m @@ -19,44 +19,44 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{h} =} findobj () ## @deftypefnx {Function File} {@var{h} =} findobj (@var{prop_name}, @var{prop_value}) -## @deftypefnx {Function File} {@var{h} =} findobj ('-property', @var{prop_name}) -## @deftypefnx {Function File} {@var{h} =} findobj ('-regexp', @var{prop_name}, @var{pattern}) -## @deftypefnx {Function File} {@var{h} =} findobj ('flat', @dots{}) +## @deftypefnx {Function File} {@var{h} =} findobj ("-property", @var{prop_name}) +## @deftypefnx {Function File} {@var{h} =} findobj ("-regexp", @var{prop_name}, @var{pattern}) +## @deftypefnx {Function File} {@var{h} =} findobj ("flat", @dots{}) ## @deftypefnx {Function File} {@var{h} =} findobj (@var{h}, @dots{}) -## @deftypefnx {Function File} {@var{h} =} findobj (@var{h}, '-depth', @var{d}, @dots{}) +## @deftypefnx {Function File} {@var{h} =} findobj (@var{h}, "-depth", @var{d}, @dots{}) ## Find graphics object with specified property values. The simplest form is ## ## @example -## findobj (@var{prop_name}, @var{prop_Value}) +## findobj (@var{prop_name}, @var{prop_value}) ## @end example ## ## @noindent ## which returns all of the handles to the objects with the name -## @var{prop_name} and the name @var{prop_Value}. The search can be limited +## @var{prop_name} and the name @var{prop_value}. The search can be limited ## to a particular object or set of objects and their descendants by ## passing a handle or set of handles @var{h} as the first argument to ## @code{findobj}. ## ## The depth of hierarchy of objects to which to search to can be limited -## with the '-depth' argument. To limit the number depth of the hierarchy +## with the "-depth" argument. To limit the number depth of the hierarchy ## to search to @var{d} generations of children, and example is ## ## @example -## findobj (@var{h}, '-depth', @var{d}, @var{prop_Name}, @var{prop_Value}) +## findobj (@var{h}, "-depth", @var{d}, @var{prop_name}, @var{prop_value}) ## @end example ## ## Specifying a depth @var{d} of 0, limits the search to the set of object -## passed in @var{h}. A depth @var{d} of 0 is equivalent to the '-flat' +## passed in @var{h}. A depth @var{d} of 0 is equivalent to the "-flat" ## argument. ## -## A specified logical operator may be applied to the pairs of @var{prop_Name} -## and @var{prop_Value}. The supported logical operators are '-and', '-or', -## '-xor', '-not'. +## A specified logical operator may be applied to the pairs of @var{prop_name} +## and @var{prop_value}. The supported logical operators are "-and", "-or", +## "-xor", "-not". ## ## The objects may also be matched by comparing a regular expression to the ## property values, where property values that match @code{regexp -## (@var{prop_Value}, @var{pattern})} are returned. Finally, objects may be -## matched by property name only, using the '-property' option. +## (@var{prop_value}, @var{pattern})} are returned. Finally, objects may be +## matched by property name only, using the "-property" option. ## @seealso{get, set} ## @end deftypefn
--- a/scripts/plot/fplot.m +++ b/scripts/plot/fplot.m @@ -33,8 +33,8 @@ ## ## @example ## @group -## fplot ("cos", [0, 2*pi]) -## fplot ("[cos(x), sin(x)]", [0, 2*pi]) +## fplot ("cos", [0, 2*pi]) +## fplot ("[cos(x), sin(x)]", [0, 2*pi]) ## @end group ## @end example ## @seealso{plot}
--- a/scripts/plot/hist.m +++ b/scripts/plot/hist.m @@ -51,7 +51,7 @@ ## ## @example ## @group -## hist (randn (1, 100), 25, "facecolor", "r", "edgecolor", "b") +## hist (randn (1, 100), 25, "facecolor", "r", "edgecolor", "b"); ## @end group ## @end example ## @@ -60,8 +60,8 @@ ## ## @example ## @group -## hist (rand (10, 3)) -## colormap (summer ()) +## hist (rand (10, 3)); +## colormap (summer ()); ## @end group ## @end example ##
--- a/scripts/plot/isocolors.m +++ b/scripts/plot/isocolors.m @@ -50,43 +50,43 @@ ## ## @example ## function [] = isofinish (p) -## set (gca, "PlotBoxAspectRatioMode", "manual", \ -## "PlotBoxAspectRatio", [1 1 1]); +## set (gca, "PlotBoxAspectRatioMode", "manual", ... +## "PlotBoxAspectRatio", [1 1 1]); ## set (p, "FaceColor", "interp"); ## ## set (p, "FaceLighting", "flat"); ## ## light ("Position", [1 1 5]); ## Available with JHandles ## endfunction ## -## N = 15; ## Increase number of vertices in each direction -## iso = .4; ## Change isovalue to .1 to display a sphere +## N = 15; # Increase number of vertices in each direction +## iso = .4; # Change isovalue to .1 to display a sphere ## lin = linspace (0, 2, N); ## [x, y, z] = meshgrid (lin, lin, lin); ## c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2); -## figure (); ## Open another figure window +## figure (); # Open another figure window ## -## subplot (2, 2, 1); view (-38, 20); +## subplot (2,2,1); view (-38, 20); ## [f, v] = isosurface (x, y, z, c, iso); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); -## cdat = rand (size (c)); ## Compute random patch color data -## isocolors (x, y, z, cdat, p); ## Directly set colors of patch -## isofinish (p); ## Call user function isofinish +## cdat = rand (size (c)); # Compute random patch color data +## isocolors (x, y, z, cdat, p); # Directly set colors of patch +## isofinish (p); # Call user function isofinish ## -## subplot (2, 2, 2); view (-38, 20); +## subplot (2,2,2); view (-38, 20); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); ## [r, g, b] = meshgrid (lin, 2-lin, 2-lin); -## cdat = isocolors (x, y, z, c, v); ## Compute color data vertices -## set (p, "FaceVertexCData", cdat); ## Set color data manually +## cdat = isocolors (x, y, z, c, v); # Compute color data vertices +## set (p, "FaceVertexCData", cdat); # Set color data manually ## isofinish (p); ## -## subplot (2, 2, 3); view (-38, 20); +## subplot (2,2,3); view (-38, 20); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); -## cdat = isocolors (r, g, b, c, p); ## Compute color data patch -## set (p, "FaceVertexCData", cdat); ## Set color data manually +## cdat = isocolors (r, g, b, c, p); # Compute color data patch +## set (p, "FaceVertexCData", cdat); # Set color data manually ## isofinish (p); ## -## subplot (2, 2, 4); view (-38, 20); +## subplot (2,2,4); view (-38, 20); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); -## r = g = b = repmat ([1:N] / N, [N, 1, N]); ## Black to white +## r = g = b = repmat ([1:N] / N, [N, 1, N]); # Black to white ## cdat = isocolors (x, y, z, r, g, b, v); ## set (p, "FaceVertexCData", cdat); ## isofinish (p);
--- a/scripts/plot/isonormals.m +++ b/scripts/plot/isonormals.m @@ -50,8 +50,8 @@ ## @smallexample ## function [] = isofinish (p) ## set (gca, "PlotBoxAspectRatioMode", "manual", ... -## "PlotBoxAspectRatio",[1 1 1]); -## set (p, "VertexNormals", -get(p,"VertexNormals")); # Revert normals +## "PlotBoxAspectRatio", [1 1 1]); +## set (p, "VertexNormals", -get (p,"VertexNormals")); # Revert normals ## set (p, "FaceColor", "interp"); ## ## set (p, "FaceLighting", "phong"); ## ## light ("Position", [1 1 5]); # Available with JHandles @@ -64,27 +64,27 @@ ## c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2); ## figure (); # Open another figure window ## -## subplot (2, 2, 1); view (-38, 20); +## subplot (2,2,1); view (-38, 20); ## [f, v, cdat] = isosurface (x, y, z, c, iso, y); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ... ## "FaceColor", "interp", "EdgeColor", "none"); ## isofinish (p); ## Call user function isofinish ## -## subplot (2, 2, 2); view (-38, 20); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ +## subplot (2,2,2); view (-38, 20); +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ... ## "FaceColor", "interp", "EdgeColor", "none"); ## isonormals (x, y, z, c, p); # Directly modify patch ## isofinish (p); ## -## subplot (2, 2, 3); view (-38, 20); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ +## subplot (2,2,3); view (-38, 20); +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ... ## "FaceColor", "interp", "EdgeColor", "none"); ## n = isonormals (x, y, z, c, v); # Compute normals of isosurface ## set (p, "VertexNormals", n); # Manually set vertex normals ## isofinish (p); ## -## subplot (2, 2, 4); view (-38, 20); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, \ +## subplot (2,2,4); view (-38, 20); +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", cdat, ... ## "FaceColor", "interp", "EdgeColor", "none"); ## isonormals (x, y, z, c, v, "negate"); # Use reverse directly ## isofinish (p);
--- a/scripts/plot/isosurface.m +++ b/scripts/plot/isosurface.m @@ -80,34 +80,34 @@ ## c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2); ## figure (); # Open another figure window ## -## subplot (2, 2, 1); view (-38, 20); +## subplot (2,2,1); view (-38, 20); ## [f, v] = isosurface (x, y, z, c, iso); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "none"); -## set (gca, "PlotBoxAspectRatioMode","manual", ... +## set (gca, "PlotBoxAspectRatioMode", "manual", ... ## "PlotBoxAspectRatio", [1 1 1]); ## # set (p, "FaceColor", "green", "FaceLighting", "phong"); ## # light ("Position", [1 1 5]); # Available with the JHandles package ## -## subplot (2, 2, 2); view (-38, 20); +## subplot (2,2,2); view (-38, 20); ## p = patch ("Faces", f, "Vertices", v, "EdgeColor", "blue"); -## set (gca, "PlotBoxAspectRatioMode","manual", ... +## set (gca, "PlotBoxAspectRatioMode", "manual", ... ## "PlotBoxAspectRatio", [1 1 1]); ## # set (p, "FaceColor", "none", "FaceLighting", "phong"); ## # light ("Position", [1 1 5]); ## -## subplot (2, 2, 3); view (-38, 20); +## subplot (2,2,3); view (-38, 20); ## [f, v, c] = isosurface (x, y, z, c, iso, y); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, \ +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, ... ## "FaceColor", "interp", "EdgeColor", "none"); -## set (gca, "PlotBoxAspectRatioMode","manual", ... +## set (gca, "PlotBoxAspectRatioMode", "manual", ... ## "PlotBoxAspectRatio", [1 1 1]); ## # set (p, "FaceLighting", "phong"); ## # light ("Position", [1 1 5]); ## -## subplot (2, 2, 4); view (-38, 20); -## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, \ +## subplot (2,2,4); view (-38, 20); +## p = patch ("Faces", f, "Vertices", v, "FaceVertexCData", c, ... ## "FaceColor", "interp", "EdgeColor", "blue"); -## set (gca, "PlotBoxAspectRatioMode","manual", ... +## set (gca, "PlotBoxAspectRatioMode", "manual", ... ## "PlotBoxAspectRatio", [1 1 1]); ## # set (p, "FaceLighting", "phong"); ## # light ("Position", [1 1 5]);
--- a/scripts/plot/linkprop.m +++ b/scripts/plot/linkprop.m @@ -28,9 +28,9 @@ ## @example ## @group ## x = 0:0.1:10; -## subplot (1, 2, 1); +## subplot (1,2,1); ## h1 = plot (x, sin (x)); -## subplot (1, 2, 2); +## subplot (1,2,2); ## h2 = plot (x, cos (x)); ## hlink = linkprop ([h1, h2], @{"color","linestyle"@}); ## set (h1, "color", "green");
--- a/scripts/plot/plot3.m +++ b/scripts/plot/plot3.m @@ -74,9 +74,9 @@ ## ## @example ## @group -## z = [0:0.05:5]; -## plot3 (cos(2*pi*z), sin(2*pi*z), z, ";helix;"); -## plot3 (z, exp(2i*pi*z), ";complex sinusoid;"); +## z = [0:0.05:5]; +## plot3 (cos (2*pi*z), sin (2*pi*z), z, ";helix;"); +## plot3 (z, exp (2i*pi*z), ";complex sinusoid;"); ## @end group ## @end example ## @seealso{plot, xlabel, ylabel, zlabel, title, print}
--- a/scripts/plot/plotmatrix.m +++ b/scripts/plot/plotmatrix.m @@ -54,9 +54,7 @@ ## the histogram and @var{pax} the corresponding axes objects. ## ## @example -## @group -## plotmatrix (randn (100, 3), 'g+') -## @end group +## plotmatrix (randn (100, 3), "g+") ## @end example ## ## @end deftypefn
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -234,9 +234,9 @@ ## ## @example ## @group -## figure (1) -## clf () -## surf (peaks) +## figure (1); +## clf (); +## surf (peaks); ## print -dsvg figure1.svg ## @end group ## @end example @@ -245,9 +245,9 @@ ## ## @example ## @group -## figure (1) -## clf () -## surf (peaks) +## figure (1); +## clf (); +## surf (peaks); ## print -dcdj550 ## @end group ## @end example
--- a/scripts/plot/private/__marching_cube__.m +++ b/scripts/plot/private/__marching_cube__.m @@ -49,7 +49,7 @@ ## @example ## @group ## N = 20; -## lin = linspace(0, 2, N); +## lin = linspace (0, 2, N); ## [x, y, z] = meshgrid (lin, lin, lin); ## ## c = (x-.5).^2 + (y-.5).^2 + (z-.5).^2; @@ -70,11 +70,11 @@ ## "FaceColor", "interp", "EdgeColor", "none"); ## ## ## Revert normals -## set (pa, "VertexNormals", -get(pa, "VertexNormals")); +## set (pa, "VertexNormals", -get (pa, "VertexNormals")); ## ## ## Set lightning (available with the JHandles package) ## # set (pa, "FaceLighting", "gouraud"); -## # light( "Position", [1 1 5]); +## # light ( "Position", [1 1 5]); ## @end group ## @end example ##
--- a/scripts/plot/refreshdata.m +++ b/scripts/plot/refreshdata.m @@ -42,9 +42,9 @@ ## y = sin (x); ## plot (x, y, "ydatasource", "y"); ## for i = 1 : 100 -## pause(0.1) -## y = sin (x + 0.1 * i); -## refreshdata(); +## pause (0.1); +## y = sin (x + 0.1*i); +## refreshdata (); ## endfor ## @end group ## @end example
--- a/scripts/plot/rose.m +++ b/scripts/plot/rose.m @@ -39,7 +39,7 @@ ## ## @example ## @group -## [r, t] = rose ([2*randn(1e5,1), pi + 2 * randn(1e5,1)]); +## [r, t] = rose ([2*randn(1e5,1), pi + 2*randn(1e5,1)]); ## polar (r, t); ## @end group ## @end example
--- a/scripts/plot/saveas.m +++ b/scripts/plot/saveas.m @@ -50,10 +50,9 @@ ## ## @example ## @group -## figure (1); ## clf (); ## surf (peaks); -## saveas(1, "figure1.png"); +## saveas (1, "figure1.png"); ## @end group ## @end example ##
--- a/scripts/plot/stem.m +++ b/scripts/plot/stem.m @@ -39,7 +39,7 @@ ## @example ## @group ## x = 1:10; -## y = ones (1, length (x))*2.*x; +## y = 2*x; ## stem (x, y, "r"); ## @end group ## @end example @@ -55,7 +55,7 @@ ## ## @example ## @group -## x = [0 : 10]'; +## x = [0:10]'; ## y = [sin(x), cos(x)] ## h = stem (x, y); ## set (h(2), "color", "g"); @@ -64,7 +64,7 @@ ## @end example ## ## @noindent -## changes the color of the second "stem series" and moves the base line +## changes the color of the second "stem series" and moves the base line ## of the first. ## @seealso{bar, barh, plot} ## @end deftypefn
--- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -56,7 +56,7 @@ ## the grid locations specified. The first demo illustrates an example: ## ## @example -## @code{demo ("subplot", 1)} +## demo ("subplot", 1) ## @end example ## ## @end ifnottex
--- a/scripts/plot/surfl.m +++ b/scripts/plot/surfl.m @@ -58,8 +58,8 @@ ## ## @example ## @group -## colormap(bone); -## surfl(peaks); +## colormap (bone (64)); +## surfl (peaks); ## shading interp; ## @end group ## @end example
--- a/scripts/plot/surfnorm.m +++ b/scripts/plot/surfnorm.m @@ -27,8 +27,8 @@ ## ## @example ## @group -## [@var{x}, @var{y}] = meshgrid (1:size(@var{z}, 1), -## 1:size(@var{z}, 2)); +## [@var{x}, @var{y}] = meshgrid (1:size (@var{z}, 1), +## 1:size (@var{z}, 2)); ## @end group ## @end example ##
--- a/scripts/plot/uimenu.m +++ b/scripts/plot/uimenu.m @@ -64,12 +64,12 @@ ## ## @example ## @group -## f = uimenu("label", "&File", "accelerator", "f"); -## e = uimenu("label", "&Edit", "accelerator", "e"); -## uimenu(f, "label", "Close", "accelerator", "q", ... -## "callback", "close (gcf)"); -## uimenu(e, "label", "Toggle &Grid", "accelerator", "g", ... -## "callback", "grid (gca)"); +## f = uimenu ("label", "&File", "accelerator", "f"); +## e = uimenu ("label", "&Edit", "accelerator", "e"); +## uimenu (f, "label", "Close", "accelerator", "q", ... +## "callback", "close (gcf)"); +## uimenu (e, "label", "Toggle &Grid", "accelerator", "g", ... +## "callback", "grid (gca)"); ## @end group ## @end example ## @seealso{figure}
--- a/scripts/polynomial/mpoles.m +++ b/scripts/polynomial/mpoles.m @@ -38,10 +38,10 @@ ## @example ## @group ## p = [2 3 1 1 2]; -## [m, n] = mpoles(p); -## @result{} m = [1; 1; 2; 1; 2] -## @result{} n = [2; 5; 1; 4; 3] -## @result{} p(n) = [3, 2, 2, 1, 1] +## [m, n] = mpoles (p) +## @result{} m = [1; 1; 2; 1; 2] +## @result{} n = [2; 5; 1; 4; 3] +## @result{} p(n) = [3, 2, 2, 1, 1] ## @end group ## @end example ##
--- a/scripts/polynomial/poly.m +++ b/scripts/polynomial/poly.m @@ -27,10 +27,10 @@ ## ## @example ## @group -## roots(poly(eye(3))) -## @result{} 1.00001 + 0.00001i -## @result{} 1.00001 - 0.00001i -## @result{} 0.99999 + 0.00000i +## roots (poly (eye (3))) +## @result{} 1.00001 + 0.00001i +## 1.00001 - 0.00001i +## 0.99999 + 0.00000i ## @end group ## @end example ##
--- a/scripts/polynomial/polyaffine.m +++ b/scripts/polynomial/polyaffine.m @@ -24,7 +24,7 @@ ## representing: ## ## @example -## g(x) = f((x-@var{mu}(1))/@var{mu}(2)). +## g(x) = f( (x - @var{mu}(1)) / @var{mu}(2) ) ## @end example ## ## @seealso{polyval, polyfit}
--- a/scripts/polynomial/polygcd.m +++ b/scripts/polynomial/polygcd.m @@ -25,16 +25,16 @@ ## Together with deconv, you can reduce a ratio of two polynomials. ## The tolerance @var{tol} defaults to @code{sqrt(eps)}. ## -## @strong{Caution:} This is a numerically unstable algorithm and should not be used on large polynomials. +## @strong{Caution:} This is a numerically unstable algorithm and should not +## be used on large polynomials. ## ## Example code: ## ## @example ## @group -## polygcd (poly(1:8), poly(3:12)) - poly(3:8) +## polygcd (poly (1:8), poly (3:12)) - poly (3:8) ## @result{} [ 0, 0, 0, 0, 0, 0, 0 ] -## deconv (poly(1:8), polygcd (poly(1:8), poly(3:12))) ... -## - poly(1:2) +## deconv (poly (1:8), polygcd (poly (1:8), poly (3:12))) - poly(1:2) ## @result{} [ 0, 0, 0 ] ## @end group ## @end example
--- a/scripts/polynomial/polyout.m +++ b/scripts/polynomial/polyout.m @@ -27,7 +27,7 @@ ## @ifnottex ## ## @example -## c(x) = c(1) * x^n + @dots{} + c(n) x + c(n+1) +## c(x) = c(1) * x^n + @dots{} + c(n) x + c(n+1) ## @end example ## ## @end ifnottex
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -33,9 +33,9 @@ ## ## @example ## @group -## B(s) M r(m) N -## ---- = SUM ------------- + SUM k(i)*s^(N-i) -## A(s) m=1 (s-p(m))^e(m) i=1 +## B(s) M r(m) N +## ---- = SUM ------------- + SUM k(i)*s^(N-i) +## A(s) m=1 (s-p(m))^e(m) i=1 ## @end group ## @end example ## @@ -52,11 +52,11 @@ ## @group ## b = [1, 1, 1]; ## a = [1, -5, 8, -4]; -## [r, p, k, e] = residue (b, a); -## @result{} r = [-2; 7; 3] -## @result{} p = [2; 2; 1] -## @result{} k = [](0x0) -## @result{} e = [1; 2; 1] +## [r, p, k, e] = residue (b, a) +## @result{} r = [-2; 7; 3] +## @result{} p = [2; 2; 1] +## @result{} k = [](0x0) +## @result{} e = [1; 2; 1] ## @end group ## @end example ## @@ -95,12 +95,11 @@ ## r = [-2; 7; 3]; ## p = [2; 2; 1]; ## k = [1, 0]; -## [b, a] = residue (r, p, k); -## @result{} b = [1, -5, 9, -3, 1] -## @result{} a = [1, -5, 8, -4] +## [b, a] = residue (r, p, k) +## @result{} b = [1, -5, 9, -3, 1] +## @result{} a = [1, -5, 8, -4] ## ## where mpoles is used to determine e = [1; 2; 1] -## ## @end group ## @end example ## @@ -112,9 +111,9 @@ ## p = [2; 1; 2]; ## k = [1, 0]; ## e = [2; 1; 1]; -## [b, a] = residue (r, p, k, e); -## @result{} b = [1, -5, 9, -3, 1] -## @result{} a = [1, -5, 8, -4] +## [b, a] = residue (r, p, k, e) +## @result{} b = [1, -5, 9, -3, 1] +## @result{} a = [1, -5, 8, -4] ## @end group ## @end example ## @@ -129,9 +128,9 @@ ## ## @example ## @group -## -2 7 3 s^4 - 5s^3 + 9s^2 - 3s + 1 -## ----- + ------- + ----- + s = -------------------------- -## (s-2) (s-2)^2 (s-1) s^3 - 5s^2 + 8s - 4 +## -2 7 3 s^4 - 5s^3 + 9s^2 - 3s + 1 +## ----- + ------- + ----- + s = -------------------------- +## (s-2) (s-2)^2 (s-1) s^3 - 5s^2 + 8s - 4 ## @end group ## @end example ##
--- a/scripts/set/ismember.m +++ b/scripts/set/ismember.m @@ -30,7 +30,7 @@ ## @group ## a = [3, 10, 1]; ## s = [0:9]; -## [tf, s_idx] = ismember (a, s); +## [tf, s_idx] = ismember (a, s) ## @result{} tf = [1, 0, 1] ## @result{} s_idx = [4, 0, 2] ## @end group @@ -42,7 +42,7 @@ ## @group ## a = @{'abc'@}; ## s = @{'abc', 'def'@}; -## [tf, s_idx] = ismember (a, s); +## [tf, s_idx] = ismember (a, s) ## @result{} tf = [1, 0] ## @result{} s_idx = [1, 0] ## @end group @@ -56,7 +56,7 @@ ## @group ## a = [1:3; 5:7; 4:6]; ## s = [0:2; 1:3; 2:4; 3:5; 4:6]; -## [tf, s_idx] = ismember(a, s, 'rows'); +## [tf, s_idx] = ismember(a, s, "rows") ## @result{} tf = logical ([1; 0; 1]) ## @result{} s_idx = [2; 0; 5]; ## @end group
--- a/scripts/set/union.m +++ b/scripts/set/union.m @@ -27,7 +27,7 @@ ## @example ## @group ## union ([1, 2, 4], [2, 3, 5]) -## @result{} [1, 2, 3, 4, 5] +## @result{} [1, 2, 3, 4, 5] ## @end group ## @end example ## @@ -37,18 +37,17 @@ ## ## @example ## @group -## union([1, 2; 2, 3], [1, 2; 3, 4], "rows") -## @result{} 1 2 -## 2 3 -## 3 4 +## union ([1, 2; 2, 3], [1, 2; 3, 4], "rows") +## @result{} 1 2 +## 2 3 +## 3 4 ## @end group ## @end example ## ## @deftypefnx {Function File} {[@var{c}, @var{ia}, @var{ib}] =} union (@var{a}, @var{b}) ## ## Return index vectors @var{ia} and @var{ib} such that @code{a(ia)} and -## @code{b(ib)} are -## disjoint sets whose union is @var{c}. +## @code{b(ib)} are disjoint sets whose union is @var{c}. ## ## @seealso{intersect, setdiff, unique} ## @end deftypefn
--- a/scripts/sparse/pcg.m +++ b/scripts/sparse/pcg.m @@ -124,17 +124,17 @@ ## ## @example ## @group -## n = 10; -## A = diag (sparse (1:n)); -## b = rand (n, 1); -## [l, u, p, q] = luinc (A, 1.e-3); +## n = 10; +## A = diag (sparse (1:n)); +## b = rand (n, 1); +## [l, u, p, q] = luinc (A, 1.e-3); ## @end group ## @end example ## ## @sc{Example 1:} Simplest use of @code{pcg} ## ## @example -## x = pcg(A,b) +## x = pcg (A,b) ## @end example ## ## @sc{Example 2:} @code{pcg} with a function which computes @@ -142,18 +142,18 @@ ## ## @example ## @group -## function y = apply_a (x) -## y = [1:N]'.*x; -## endfunction +## function y = apply_a (x) +## y = [1:N]' .* x; +## endfunction ## -## x = pcg ("apply_a", b) +## x = pcg ("apply_a", b) ## @end group ## @end example ## ## @sc{Example 3:} @code{pcg} with a preconditioner: @var{l} * @var{u} ## ## @example -## x = pcg (A, b, 1.e-6, 500, l*u); +## x = pcg (A, b, 1.e-6, 500, l*u) ## @end example ## ## @sc{Example 4:} @code{pcg} with a preconditioner: @var{l} * @var{u}. @@ -161,7 +161,7 @@ ## are easier to invert ## ## @example -## x = pcg (A, b, 1.e-6, 500, l, u); +## x = pcg (A, b, 1.e-6, 500, l, u) ## @end example ## ## @sc{Example 5:} Preconditioned iteration, with full diagnostics. The @@ -170,15 +170,15 @@ ## ## @example ## @group -## function y = apply_m (x) -## k = floor (length (x) - 2); -## y = x; -## y(1:k) = x(1:k)./[1:k]'; -## endfunction +## function y = apply_m (x) +## k = floor (length (x) - 2); +## y = x; +## y(1:k) = x(1:k) ./ [1:k]'; +## endfunction ## -## [x, flag, relres, iter, resvec, eigest] = ... -## pcg (A, b, [], [], "apply_m"); -## semilogy (1:iter+1, resvec); +## [x, flag, relres, iter, resvec, eigest] = ... +## pcg (A, b, [], [], "apply_m"); +## semilogy (1:iter+1, resvec); ## @end group ## @end example ## @@ -187,14 +187,14 @@ ## ## @example ## @group -## function y = apply_M (x, varargin) +## function y = apply_M (x, varargin) ## K = varargin@{1@}; ## y = x; -## y(1:K) = x(1:K)./[1:K]'; -## endfunction +## y(1:K) = x(1:K) ./ [1:K]'; +## endfunction ## -## [x, flag, relres, iter, resvec, eigest] = ... -## pcg (A, b, [], [], "apply_m", [], [], 3) +## [x, flag, relres, iter, resvec, eigest] = ... +## pcg (A, b, [], [], "apply_m", [], [], 3) ## @end group ## @end example ## @@ -216,8 +216,7 @@ ## Author: Piotr Krzyzanowski <piotr.krzyzanowski@mimuw.edu.pl> ## Modified by: Vittoria Rezzonico <vittoria.rezzonico@epfl.ch> -## - Add the ability to provide the pre-conditioner as two separate -## matrices +## - Add the ability to provide the pre-conditioner as two separate matrices function [x, flag, relres, iter, resvec, eigest] = pcg (A, b, tol, maxit, m1, m2, x0, varargin)
--- a/scripts/sparse/pcr.m +++ b/scripts/sparse/pcr.m @@ -101,16 +101,16 @@ ## ## @example ## @group -## n = 10; -## A = sparse (diag (1:n)); -## b = rand (N, 1); +## n = 10; +## A = sparse (diag (1:n)); +## b = rand (N, 1); ## @end group ## @end example ## ## @sc{Example 1:} Simplest use of @code{pcr} ## ## @example -## x = pcr(A, b) +## x = pcr (A, b) ## @end example ## ## @sc{Example 2:} @code{pcr} with a function which computes @@ -118,11 +118,11 @@ ## ## @example ## @group -## function y = apply_a (x) -## y = [1:10]'.*x; -## endfunction +## function y = apply_a (x) +## y = [1:10]' .* x; +## endfunction ## -## x = pcr ("apply_a", b) +## x = pcr ("apply_a", b) ## @end group ## @end example ## @@ -132,15 +132,15 @@ ## ## @example ## @group -## function y = apply_m (x) -## k = floor (length(x)-2); -## y = x; -## y(1:k) = x(1:k)./[1:k]'; -## endfunction +## function y = apply_m (x) +## k = floor (length (x) - 2); +## y = x; +## y(1:k) = x(1:k) ./ [1:k]'; +## endfunction ## -## [x, flag, relres, iter, resvec] = ... -## pcr (A, b, [], [], "apply_m") -## semilogy([1:iter+1], resvec); +## [x, flag, relres, iter, resvec] = ... +## pcr (A, b, [], [], "apply_m") +## semilogy ([1:iter+1], resvec); ## @end group ## @end example ## @@ -149,13 +149,14 @@ ## ## @example ## @group -## function y = apply_m (x, varargin) -## k = varargin@{1@}; -## y = x; y(1:k) = x(1:k)./[1:k]'; -## endfunction +## function y = apply_m (x, varargin) +## k = varargin@{1@}; +## y = x; +## y(1:k) = x(1:k) ./ [1:k]'; +## endfunction ## -## [x, flag, relres, iter, resvec] = ... -## pcr (A, b, [], [], "apply_m"', [], 3) +## [x, flag, relres, iter, resvec] = ... +## pcr (A, b, [], [], "apply_m"', [], 3) ## @end group ## @end example ##
--- a/scripts/sparse/spaugment.m +++ b/scripts/sparse/spaugment.m @@ -22,19 +22,18 @@ ## ## @example ## @group -## [@var{c} * eye(@var{m}, @var{m}),@var{A}; @var{A}', zeros(@var{n}, -## @var{n})] +## [@var{c} * eye(@var{m}, @var{m}), @var{A}; +## @var{A}', zeros(@var{n}, @var{n})] ## @end group ## @end example ## ## @noindent ## This is related to the least squares solution of -## @code{@var{A} \\ @var{b}}, by +## @code{@var{A} \ @var{b}}, by ## ## @example ## @group -## @var{s} * [ @var{r} / @var{c}; x] = [@var{b}, zeros(@var{n}, -## columns(@var{b})] +## @var{s} * [ @var{r} / @var{c}; x] = [ @var{b}, zeros(@var{n}, columns(@var{b})) ] ## @end group ## @end example ## @@ -53,7 +52,7 @@ ## ## @example ## @group -## m = 11; n = 10; mn = max(m ,n); +## m = 11; n = 10; mn = max (m, n); ## A = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)], ## [-1, 0, 1], m, n); ## x0 = A \ ones (m,1);
--- a/scripts/sparse/spdiags.m +++ b/scripts/sparse/spdiags.m @@ -42,7 +42,7 @@ ## @example ## @group ## spdiags (reshape (1:12, 4, 3), [-1 0 1], 5, 4) -## @result{} 5 10 0 0 +## @result{} 5 10 0 0 ## 1 6 11 0 ## 0 2 7 12 ## 0 0 3 8
--- a/scripts/sparse/svds.m +++ b/scripts/sparse/svds.m @@ -29,9 +29,9 @@ ## ## @example ## @group -## [@var{m}, @var{n}] = size(@var{A}) -## @var{s} = eigs([sparse(@var{m}, @var{m}), @var{A}; -## @var{A}', sparse(@var{n}, @var{n})]) +## [@var{m}, @var{n}] = size (@var{A}); +## @var{s} = eigs ([sparse(@var{m}, @var{m}), @var{A}; +## @var{A}', sparse(@var{n}, @var{n})]) ## @end group ## @end example ##
--- a/scripts/specfun/legendre.m +++ b/scripts/specfun/legendre.m @@ -43,7 +43,7 @@ ## @example ## @group ## m m 2 m/2 d^m -## P(x) = (-1) * (1-x ) * ---- P (x) +## P(x) = (-1) * (1-x ) * ---- P(x) ## n dx^m n ## @end group ## @end example @@ -62,9 +62,9 @@ ## ## @example ## @group -## 1 d^n 2 n -## P (x) = ------ [----(x - 1) ] -## n 2^n n! dx^n +## 1 d^n 2 n +## P(x) = ------ [----(x - 1) ] +## n 2^n n! dx^n ## @end group ## @end example ## @@ -75,7 +75,7 @@ ## ## @example ## @group -## x | -1.0 | -0.9 | -0.8 +## x | -1.0 | -0.9 | -0.8 ## ------------------------------------ ## m=0 | -1.00000 | -0.47250 | -0.08000 ## m=1 | 0.00000 | -1.99420 | -1.98000 @@ -100,9 +100,9 @@ ## ## @example ## @group -## 0 0 -## SP (x) = P (x) -## n n +## 0 0 +## SP(x) = P(x) +## n n ## @end group ## @end example ## @@ -119,9 +119,9 @@ ## ## @example ## @group -## m m m 2(n-m)! 0.5 -## SP (x) = P (x) * (-1) * [-------] -## n n (n+m)! +## m m m 2(n-m)! 0.5 +## SP(x) = P(x) * (-1) * [-------] +## n n (n+m)! ## @end group ## @end example ## @@ -143,9 +143,9 @@ ## ## @example ## @group -## m m m (n+0.5)(n-m)! 0.5 -## NP (x) = P (x) * (-1) * [-------------] -## n n (n+m)! +## m m m (n+0.5)(n-m)! 0.5 +## NP(x) = P(x) * (-1) * [-------------] +## n n (n+m)! ## @end group ## @end example ##
--- a/scripts/special-matrix/hankel.m +++ b/scripts/special-matrix/hankel.m @@ -29,7 +29,7 @@ ## @var{r}, has the elements ## @tex ## $$ -## H (i, j) = \cases{c_{i+j-1},&$i+j-1\le m$;\cr r_{i+j-m},&otherwise.\cr} +## H(i, j) = \cases{c_{i+j-1},&$i+j-1\le m$;\cr r_{i+j-m},&otherwise.\cr} ## $$ ## @end tex ## @ifnottex
--- a/scripts/special-matrix/hilb.m +++ b/scripts/special-matrix/hilb.m @@ -22,13 +22,13 @@ ## of a Hilbert matrix is defined as ## @tex ## $$ -## H (i, j) = {1 \over (i + j - 1)} +## H(i, j) = {1 \over (i + j - 1)} ## $$ ## @end tex ## @ifnottex ## ## @example -## H (i, j) = 1 / (i + j - 1) +## H(i, j) = 1 / (i + j - 1) ## @end example ## ## @end ifnottex @@ -41,9 +41,9 @@ ## @example ## @group ## cond (rand (5)) -## @result{} 14.392 +## @result{} 14.392 ## cond (hilb (5)) -## @result{} 4.7661e+05 +## @result{} 4.7661e+05 ## @end group ## @end example ##
--- a/scripts/statistics/base/cloglog.m +++ b/scripts/statistics/base/cloglog.m @@ -27,7 +27,7 @@ ## @ifnottex ## ## @example -## cloglog(x) = - log (- log (@var{x})) +## cloglog (x) = - log (- log (@var{x})) ## @end example ## ## @end ifnottex
--- a/scripts/statistics/base/corr.m +++ b/scripts/statistics/base/corr.m @@ -33,7 +33,7 @@ ## @ifnottex ## ## @example -## corr(x,y) = cov(x,y)/(std(x)*std(y)) +## corr (x,y) = cov (x,y) / (std (x) * std (y)) ## @end example ## ## @end ifnottex
--- a/scripts/statistics/base/kurtosis.m +++ b/scripts/statistics/base/kurtosis.m @@ -29,7 +29,7 @@ ## @ifnottex ## ## @example -## kurtosis (x) = N^(-1) std(x)^(-4) sum ((x - mean(x)).^4) - 3 +## kurtosis (x) = 1/N std(x)^(-4) sum ((x - mean(x)).^4) - 3 ## @end example ## ## @end ifnottex
--- a/scripts/statistics/base/logit.m +++ b/scripts/statistics/base/logit.m @@ -27,7 +27,7 @@ ## @ifnottex ## ## @example -## logit(@var{p}) = log (@var{p} / (1-@var{p})) +## logit (@var{p}) = log (@var{p} / (1-@var{p})) ## @end example ## ## @end ifnottex
--- a/scripts/statistics/base/median.m +++ b/scripts/statistics/base/median.m @@ -34,9 +34,9 @@ ## ## @example ## @group -## x(ceil(N/2)), N odd -## median(x) = -## (x(N/2) + x((N/2)+1))/2, N even +## x(ceil(N/2)) N odd +## median (x) = +## (x(N/2) + x((N/2)+1))/2 N even ## @end group ## @end example ##
--- a/scripts/statistics/base/moment.m +++ b/scripts/statistics/base/moment.m @@ -43,6 +43,7 @@ ## ## The optional string @var{type} specifies the type of moment to be computed. ## Valid options are: +## ## @table @asis ## @item "c" ## Central Moment. The moment about the mean defined as @@ -72,7 +73,7 @@ ## ## @example ## @group -## 1/N SUM_i ( abs(x(i)) )^p +## 1/N SUM_i ( abs (x(i)) )^p ## @end group ## @end example ## @@ -89,7 +90,7 @@ ## ## @example ## @group -## 1/N SUM_i ( abs(x(i) - mean(x)) )^p +## 1/N SUM_i ( abs (x(i) - mean(x)) )^p ## @end group ## @end example ##
--- a/scripts/statistics/base/skewness.m +++ b/scripts/statistics/base/skewness.m @@ -29,7 +29,7 @@ ## @ifnottex ## ## @example -## skewness (x) = N^(-1) std(x)^(-3) sum ((x - mean(x)).^3) +## skewness (x) = 1/N std(x)^(-3) sum ((x - mean(x)).^3) ## @end example ## ## @end ifnottex
--- a/scripts/statistics/distributions/wblpdf.m +++ b/scripts/statistics/distributions/wblpdf.m @@ -30,7 +30,7 @@ ## @ifnottex ## ## @example -## shape * scale^(-shape) * x^(shape-1) * exp (-(x/scale)^shape) +## shape * scale^(-shape) * x^(shape-1) * exp (-(x/scale)^shape) ## @end example ## ## @end ifnottex
--- a/scripts/strings/base2dec.m +++ b/scripts/strings/base2dec.m @@ -24,7 +24,7 @@ ## @example ## @group ## base2dec ("11120", 3) -## @result{} 123 +## @result{} 123 ## @end group ## @end example ## @@ -42,7 +42,7 @@ ## @example ## @group ## base2dec ("yyyzx", "xyz") -## @result{} 123 +## @result{} 123 ## @end group ## @end example ## @seealso{dec2base, bin2dec, hex2dec}
--- a/scripts/strings/cstrcat.m +++ b/scripts/strings/cstrcat.m @@ -24,7 +24,7 @@ ## @example ## @group ## cstrcat ("ab ", "cd") -## @result{} "ab cd" +## @result{} "ab cd" ## @end group ## @end example ## @@ -32,8 +32,7 @@ ## @group ## s = [ "ab"; "cde" ]; ## cstrcat (s, s, s) -## @result{} ans = -## "ab ab ab " +## @result{} "ab ab ab " ## "cdecdecde" ## @end group ## @end example
--- a/scripts/strings/dec2base.m +++ b/scripts/strings/dec2base.m @@ -25,7 +25,7 @@ ## @example ## @group ## dec2base (123, 3) -## @result{} "11120" +## @result{} "11120" ## @end group ## @end example ## @@ -40,7 +40,7 @@ ## @example ## @group ## dec2base (123, "aei") -## @result{} "eeeia" +## @result{} "eeeia" ## @end group ## @end example ##
--- a/scripts/strings/index.m +++ b/scripts/strings/index.m @@ -28,7 +28,7 @@ ## @example ## @group ## index ("Teststring", "t") -## @result{} 4 +## @result{} 4 ## @end group ## @end example ##
--- a/scripts/strings/str2num.m +++ b/scripts/strings/str2num.m @@ -27,9 +27,8 @@ ## str2num ("3.141596") ## @result{} 3.141596 ## -## str2num (["1, 2, 3"; "4, 5, 6"]); -## @result{} ans = -## 1 2 3 +## str2num (["1, 2, 3"; "4, 5, 6"]) +## @result{} 1 2 3 ## 4 5 6 ## @end group ## @end example
--- a/scripts/strings/strcat.m +++ b/scripts/strings/strcat.m @@ -30,7 +30,7 @@ ## @group ## s = [ "ab"; "cde" ]; ## strcat (s, s, s) -## @result{} ans = +## @result{} ## "ab ab ab " ## "cdecdecde" ## @end group @@ -40,7 +40,7 @@ ## @group ## s = @{ "ab"; "cde" @}; ## strcat (s, s, s) -## @result{} ans = +## @result{} ## @{ ## [1,1] = ababab ## [2,1] = cdecdecde
--- a/scripts/strings/strjust.m +++ b/scripts/strings/strjust.m @@ -32,11 +32,11 @@ ## @example ## @group ## strjust (["a"; "ab"; "abc"; "abcd"]) -## @result{} ans = -## a -## ab -## abc -## abcd +## @result{} +## " a" +## " ab" +## " abc" +## "abcd" ## @end group ## @end example ## @seealso{deblank, strrep, strtrim, untabify}
--- a/scripts/strings/strsplit.m +++ b/scripts/strings/strsplit.m @@ -32,7 +32,7 @@ ## @example ## @group ## strsplit ("a,b,c", ",") -## @result{} +## @result{} ## @{ ## [1,1] = a ## [1,2] = b @@ -40,7 +40,7 @@ ## @} ## ## strsplit (["a,b" ; "cde"], ",") -## @result{} +## @result{} ## @{ ## [1,1] = a ## [1,2] = b
--- a/scripts/testfun/demo.m +++ b/scripts/testfun/demo.m @@ -34,11 +34,11 @@ ## ## @example ## @group -## %!demo -## %! t=0:0.01:2*pi; x = sin(t); -## %! plot (t,x) -## %! %------------------------------------------------- -## %! % the figure window shows one cycle of a sine wave +## %!demo +## %! t=0:0.01:2*pi; x = sin (t); +## %! plot (t,x) +## %! %------------------------------------------------- +## %! % the figure window shows one cycle of a sine wave ## @end group ## @end example ## @@ -52,7 +52,7 @@ ## with the code ## ## @example -## %! input("Press <enter> to continue: ","s"); +## %! input("Press <enter> to continue: ","s"); ## @end example ## ## @noindent @@ -71,12 +71,12 @@ ## ## @example ## @group -## %!demo if 1 -## %! function y=f(x) -## %! y=x; -## %! endfunction -## %! f(3) -## %! endif +## %!demo if 1 +## %! function y=f(x) +## %! y=x; +## %! endfunction +## %! f(3) +## %! endif ## @end group ## @end example ##
--- a/scripts/time/ctime.m +++ b/scripts/time/ctime.m @@ -26,7 +26,7 @@ ## @example ## @group ## ctime (time ()) -## @result{} "Mon Feb 17 01:15:06 1997" +## @result{} "Mon Feb 17 01:15:06 1997" ## @end group ## @end example ## @seealso{asctime, time, localtime}