# HG changeset patch # User Rik # Date 1328422370 28800 # Node ID 4d917a6a858bf6f657a3633c535d369e8ef777d6 # Parent a646cee995cf1c672b7e714456bd5c47739b0982 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. diff -r a646cee995cf -r 4d917a6a858b scripts/general/accumarray.m --- a/scripts/general/accumarray.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/accumarray.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/accumdim.m --- a/scripts/general/accumdim.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/accumdim.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/bitcmp.m --- a/scripts/general/bitcmp.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/bitcmp.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/general/bitset.m --- a/scripts/general/bitset.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/bitset.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/general/celldisp.m --- a/scripts/general/celldisp.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/celldisp.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/chop.m --- a/scripts/general/chop.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/chop.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/general/colon.m --- a/scripts/general/colon.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/colon.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/general/flipdim.m --- a/scripts/general/flipdim.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/flipdim.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/general/genvarname.m --- a/scripts/general/genvarname.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/genvarname.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/idivide.m --- a/scripts/general/idivide.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/idivide.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/int2str.m --- a/scripts/general/int2str.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/int2str.m Sat Feb 04 22:12:50 2012 -0800 @@ -23,7 +23,6 @@ ## ## @example ## @group -## ## int2str (123) ## @result{} "123" ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/interp1.m --- a/scripts/general/interp1.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/interp1.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/quadgk.m --- a/scripts/general/quadgk.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/quadgk.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/general/randi.m --- a/scripts/general/randi.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/randi.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/general/rat.m --- a/scripts/general/rat.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/rat.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/rot90.m --- a/scripts/general/rot90.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/rot90.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/general/saveobj.m --- a/scripts/general/saveobj.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/saveobj.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/general/shiftdim.m --- a/scripts/general/shiftdim.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/shiftdim.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/general/structfun.m --- a/scripts/general/structfun.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/structfun.m Sat Feb 04 22:12:50 2012 -0800 @@ -47,7 +47,7 @@ ## s.name2 = "Jill Jones"; ## structfun (@@(x) regexp (x, '(\w+)$', "matches")@{1@}, s, ## "UniformOutput", false) -## @result{} +## @result{} ## @{ ## name1 = Smith ## name2 = Jones diff -r a646cee995cf -r 4d917a6a858b scripts/general/subsindex.m --- a/scripts/general/subsindex.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/general/subsindex.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/geometry/voronoi.m --- a/scripts/geometry/voronoi.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/geometry/voronoi.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/help/__makeinfo__.m --- a/scripts/help/__makeinfo__.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/help/__makeinfo__.m Sat Feb 04 22:12:50 2012 -0800 @@ -41,7 +41,7 @@ ## will be expanded to the text ## ## @example -## See also: arg1, arg2@, ... +## See also: arg1, arg2, ... ## @end example ## ## @noindent diff -r a646cee995cf -r 4d917a6a858b scripts/io/dlmwrite.m --- a/scripts/io/dlmwrite.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/io/dlmwrite.m Sat Feb 04 22:12:50 2012 -0800 @@ -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. diff -r a646cee995cf -r 4d917a6a858b scripts/io/strread.m --- a/scripts/io/strread.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/io/strread.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/linear-algebra/expm.m --- a/scripts/linear-algebra/expm.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/linear-algebra/expm.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/linear-algebra/logm.m --- a/scripts/linear-algebra/logm.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/linear-algebra/logm.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/linear-algebra/qzhess.m --- a/scripts/linear-algebra/qzhess.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/linear-algebra/qzhess.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/bincoeff.m --- a/scripts/miscellaneous/bincoeff.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/bincoeff.m Sat Feb 04 22:12:50 2012 -0800 @@ -42,7 +42,7 @@ ## @example ## @group ## bincoeff (5, 2) -## @result{} 10 +## @result{} 10 ## @end group ## @end example ## diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/computer.m --- a/scripts/miscellaneous/computer.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/computer.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/dir.m --- a/scripts/miscellaneous/dir.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/dir.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/getfield.m --- a/scripts/miscellaneous/getfield.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/getfield.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/mkoctfile.m --- a/scripts/miscellaneous/mkoctfile.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/mkoctfile.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/orderfields.m --- a/scripts/miscellaneous/orderfields.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/orderfields.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/substruct.m --- a/scripts/miscellaneous/substruct.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/substruct.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/miscellaneous/warning_ids.m --- a/scripts/miscellaneous/warning_ids.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/miscellaneous/warning_ids.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/optimization/qp.m --- a/scripts/optimization/qp.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/optimization/qp.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/optimization/sqp.m --- a/scripts/optimization/sqp.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/optimization/sqp.m Sat Feb 04 22:12:50 2012 -0800 @@ -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]; diff -r a646cee995cf -r 4d917a6a858b scripts/plot/bar.m --- a/scripts/plot/bar.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/bar.m Sat Feb 04 22:12:50 2012 -0800 @@ -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") diff -r a646cee995cf -r 4d917a6a858b scripts/plot/clabel.m --- a/scripts/plot/clabel.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/clabel.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/compass.m --- a/scripts/plot/compass.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/compass.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/contour3.m --- a/scripts/plot/contour3.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/contour3.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/contourc.m --- a/scripts/plot/contourc.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/contourc.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/plot/cylinder.m --- a/scripts/plot/cylinder.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/cylinder.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezcontour.m --- a/scripts/plot/ezcontour.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezcontour.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezcontourf.m --- a/scripts/plot/ezcontourf.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezcontourf.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezmesh.m --- a/scripts/plot/ezmesh.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezmesh.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezmeshc.m --- a/scripts/plot/ezmeshc.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezmeshc.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezplot.m --- a/scripts/plot/ezplot.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezplot.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezsurf.m --- a/scripts/plot/ezsurf.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezsurf.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/ezsurfc.m --- a/scripts/plot/ezsurfc.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/ezsurfc.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/feather.m --- a/scripts/plot/feather.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/feather.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/findobj.m --- a/scripts/plot/findobj.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/findobj.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/fplot.m --- a/scripts/plot/fplot.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/fplot.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/plot/hist.m --- a/scripts/plot/hist.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/hist.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/isocolors.m --- a/scripts/plot/isocolors.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/isocolors.m Sat Feb 04 22:12:50 2012 -0800 @@ -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); diff -r a646cee995cf -r 4d917a6a858b scripts/plot/isonormals.m --- a/scripts/plot/isonormals.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/isonormals.m Sat Feb 04 22:12:50 2012 -0800 @@ -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); diff -r a646cee995cf -r 4d917a6a858b scripts/plot/isosurface.m --- a/scripts/plot/isosurface.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/isosurface.m Sat Feb 04 22:12:50 2012 -0800 @@ -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]); diff -r a646cee995cf -r 4d917a6a858b scripts/plot/linkprop.m --- a/scripts/plot/linkprop.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/linkprop.m Sat Feb 04 22:12:50 2012 -0800 @@ -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"); diff -r a646cee995cf -r 4d917a6a858b scripts/plot/plot3.m --- a/scripts/plot/plot3.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/plot3.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/plot/plotmatrix.m --- a/scripts/plot/plotmatrix.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/plotmatrix.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/print.m --- a/scripts/plot/print.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/print.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/private/__marching_cube__.m --- a/scripts/plot/private/__marching_cube__.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/private/__marching_cube__.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/refreshdata.m --- a/scripts/plot/refreshdata.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/refreshdata.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/rose.m --- a/scripts/plot/rose.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/rose.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/saveas.m --- a/scripts/plot/saveas.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/saveas.m Sat Feb 04 22:12:50 2012 -0800 @@ -50,10 +50,9 @@ ## ## @example ## @group -## figure (1); ## clf (); ## surf (peaks); -## saveas(1, "figure1.png"); +## saveas (1, "figure1.png"); ## @end group ## @end example ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/stem.m --- a/scripts/plot/stem.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/stem.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/subplot.m --- a/scripts/plot/subplot.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/subplot.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/plot/surfl.m --- a/scripts/plot/surfl.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/surfl.m Sat Feb 04 22:12:50 2012 -0800 @@ -58,8 +58,8 @@ ## ## @example ## @group -## colormap(bone); -## surfl(peaks); +## colormap (bone (64)); +## surfl (peaks); ## shading interp; ## @end group ## @end example diff -r a646cee995cf -r 4d917a6a858b scripts/plot/surfnorm.m --- a/scripts/plot/surfnorm.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/surfnorm.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/plot/uimenu.m --- a/scripts/plot/uimenu.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/plot/uimenu.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/mpoles.m --- a/scripts/polynomial/mpoles.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/mpoles.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/poly.m --- a/scripts/polynomial/poly.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/poly.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/polyaffine.m --- a/scripts/polynomial/polyaffine.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/polyaffine.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/polygcd.m --- a/scripts/polynomial/polygcd.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/polygcd.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/polyout.m --- a/scripts/polynomial/polyout.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/polyout.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/polynomial/residue.m --- a/scripts/polynomial/residue.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/polynomial/residue.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/set/ismember.m --- a/scripts/set/ismember.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/set/ismember.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/set/union.m --- a/scripts/set/union.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/set/union.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/sparse/pcg.m --- a/scripts/sparse/pcg.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/sparse/pcg.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## Modified by: Vittoria Rezzonico -## - 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) diff -r a646cee995cf -r 4d917a6a858b scripts/sparse/pcr.m --- a/scripts/sparse/pcr.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/sparse/pcr.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/sparse/spaugment.m --- a/scripts/sparse/spaugment.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/sparse/spaugment.m Sat Feb 04 22:12:50 2012 -0800 @@ -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); diff -r a646cee995cf -r 4d917a6a858b scripts/sparse/spdiags.m --- a/scripts/sparse/spdiags.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/sparse/spdiags.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/sparse/svds.m --- a/scripts/sparse/svds.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/sparse/svds.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/specfun/legendre.m --- a/scripts/specfun/legendre.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/specfun/legendre.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/special-matrix/hankel.m --- a/scripts/special-matrix/hankel.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/special-matrix/hankel.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/special-matrix/hilb.m --- a/scripts/special-matrix/hilb.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/special-matrix/hilb.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/cloglog.m --- a/scripts/statistics/base/cloglog.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/cloglog.m Sat Feb 04 22:12:50 2012 -0800 @@ -27,7 +27,7 @@ ## @ifnottex ## ## @example -## cloglog(x) = - log (- log (@var{x})) +## cloglog (x) = - log (- log (@var{x})) ## @end example ## ## @end ifnottex diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/corr.m --- a/scripts/statistics/base/corr.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/corr.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/kurtosis.m --- a/scripts/statistics/base/kurtosis.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/kurtosis.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/logit.m --- a/scripts/statistics/base/logit.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/logit.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/median.m --- a/scripts/statistics/base/median.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/median.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/moment.m --- a/scripts/statistics/base/moment.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/moment.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/base/skewness.m --- a/scripts/statistics/base/skewness.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/base/skewness.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/statistics/distributions/wblpdf.m --- a/scripts/statistics/distributions/wblpdf.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/statistics/distributions/wblpdf.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/strings/base2dec.m --- a/scripts/strings/base2dec.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/base2dec.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/strings/cstrcat.m --- a/scripts/strings/cstrcat.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/cstrcat.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/strings/dec2base.m --- a/scripts/strings/dec2base.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/dec2base.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/strings/index.m --- a/scripts/strings/index.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/index.m Sat Feb 04 22:12:50 2012 -0800 @@ -28,7 +28,7 @@ ## @example ## @group ## index ("Teststring", "t") -## @result{} 4 +## @result{} 4 ## @end group ## @end example ## diff -r a646cee995cf -r 4d917a6a858b scripts/strings/str2num.m --- a/scripts/strings/str2num.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/str2num.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/strings/strcat.m --- a/scripts/strings/strcat.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/strcat.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/strings/strjust.m --- a/scripts/strings/strjust.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/strjust.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/strings/strsplit.m --- a/scripts/strings/strsplit.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/strings/strsplit.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 diff -r a646cee995cf -r 4d917a6a858b scripts/testfun/demo.m --- a/scripts/testfun/demo.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/testfun/demo.m Sat Feb 04 22:12:50 2012 -0800 @@ -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 to continue: ","s"); +## %! input("Press 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 ## diff -r a646cee995cf -r 4d917a6a858b scripts/time/ctime.m --- a/scripts/time/ctime.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/time/ctime.m Sat Feb 04 22:12:50 2012 -0800 @@ -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} diff -r a646cee995cf -r 4d917a6a858b scripts/time/date.m --- a/scripts/time/date.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/time/date.m Sat Feb 04 22:12:50 2012 -0800 @@ -25,7 +25,7 @@ ## @example ## @group ## date () -## @result{} "20-Aug-1993" +## @result{} "20-Aug-1993" ## @end group ## @end example ## @seealso{now, clock, datestr, localtime} diff -r a646cee995cf -r 4d917a6a858b scripts/time/is_leap_year.m --- a/scripts/time/is_leap_year.m Sat Feb 04 10:29:50 2012 -0500 +++ b/scripts/time/is_leap_year.m Sat Feb 04 22:12:50 2012 -0800 @@ -26,7 +26,7 @@ ## @example ## @group ## is_leap_year (2000) -## @result{} 1 +## @result{} 1 ## @end group ## @end example ## @seealso{weekday, eomday, calendar}