# HG changeset patch # User jwe # Date 948274588 0 # Node ID d25bc039237bec8f505881b833de8f6ebbb198c8 # Parent e031284eea27befe6e0a6e771d6a97c49022bd81 [project @ 2000-01-19 09:36:14 by jwe] diff --git a/scripts/audio/record.m b/scripts/audio/record.m --- a/scripts/audio/record.m +++ b/scripts/audio/record.m @@ -26,13 +26,6 @@ ## @end deftypefn ## @seealso{lin2mu, mu2lin, loadaudio, saveaudio, playaudio, and setaudio} -## usage: X = record (sec [, sampling_rate]) -## -## Records sec seconds of audio into the vector X. -## The default value for the sampling_rate is 8000, ie. 8kHz. -## The program waits for you to hit the ENTER key, then the recording -## starts immediatly. - ## Author: AW ## Created: 19 September 1994 ## Adapted-By: jwe diff --git a/scripts/audio/saveaudio.m b/scripts/audio/saveaudio.m --- a/scripts/audio/saveaudio.m +++ b/scripts/audio/saveaudio.m @@ -53,7 +53,7 @@ X = X'; nr = nc; else - error ("saveaudio: X must be a vector."); + error ("saveaudio: X must be a vector"); endif endif diff --git a/scripts/elfun/lcm.m b/scripts/elfun/lcm.m --- a/scripts/elfun/lcm.m +++ b/scripts/elfun/lcm.m @@ -53,7 +53,7 @@ endif if (round (a) != a) - error ("lcm: all arguments must be integer"); + error ("lcm: all arguments must be integer"); endif if (any (a) == 0) diff --git a/scripts/finance/fv.m b/scripts/finance/fv.m --- a/scripts/finance/fv.m +++ b/scripts/finance/fv.m @@ -31,8 +31,8 @@ ## not 5 percent). ## @end deftypefn -## Author: KH -## Description: Future value of an investment +## Author: KH +## Description: Future value of an investment function v = fv (r, n, p, l, m) @@ -41,11 +41,11 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("fv: r must be a scalar > -1"); + error ("fv: r must be a scalar > -1"); elseif (! (is_scalar (n) && (n > 0))) - error ("fv: n must be a positive scalar"); + error ("fv: n must be a positive scalar"); elseif (! is_scalar (p)) - error ("fv: p must be a scalar."); + error ("fv: p must be a scalar"); endif if (r != 0) @@ -57,7 +57,7 @@ if (nargin > 3) if (nargin == 5) if (! isstr (m)) - error ("fv: `method' must be a string"); + error ("fv: `method' must be a string"); endif elseif isstr (l) m = l; @@ -71,7 +71,7 @@ if is_scalar (l) v = v + fvl (r, n, l); else - error ("fv: l must be a scalar"); + error ("fv: l must be a scalar"); endif endif diff --git a/scripts/finance/fvl.m b/scripts/finance/fvl.m --- a/scripts/finance/fvl.m +++ b/scripts/finance/fvl.m @@ -24,8 +24,8 @@ ## not 5 percent). ## @end deftypefn -## Author: KH -## Description: Future value of an initial lump sum investment +## Author: KH +## Description: Future value of an initial lump sum investment function v = fvl (r, n, l) @@ -34,11 +34,11 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("fvl: r has to be a scalar > -1"); + error ("fvl: r has to be a scalar > -1"); elseif (! (is_scalar (n) && (n > 0))) - error ("fvl: n has to be a positive scalar"); + error ("fvl: n has to be a positive scalar"); elseif (! is_scalar (l)) - error ("fvl: l has to be a scalar"); + error ("fvl: l has to be a scalar"); endif v = l * (1 + r)^n; diff --git a/scripts/finance/irr.m b/scripts/finance/irr.m --- a/scripts/finance/irr.m +++ b/scripts/finance/irr.m @@ -23,8 +23,8 @@ ## @end deftypefn ## @seealso{npv, pv, and rate} -## Author: KH -## Description: Internal rate of return of an investment +## Author: KH +## Description: Internal rate of return of an investment function r = irr (p, i) @@ -35,13 +35,13 @@ endif if (! (is_vector (p))) - error ("irr: p must be a vector"); + error ("irr: p must be a vector"); else p_string = strcat ("[", sprintf ("%.15f, ", p), "]"); endif if (! is_scalar (i)) - error ("irr: i must be a scalar"); + error ("irr: i must be a scalar"); endif r = fsolve (sprintf ("npv (x, %s) - %g", p_string, i), 0.01); diff --git a/scripts/finance/nper.m b/scripts/finance/nper.m --- a/scripts/finance/nper.m +++ b/scripts/finance/nper.m @@ -31,8 +31,8 @@ ## @end deftypefn ## @seealso{pv, pmt, rate, and npv} -## Author: KH -## Description: Number of payments needed for amortizing a loan +## Author: KH +## Description: Number of payments needed for amortizing a loan function n = nper (r, p, a, l, m) @@ -41,16 +41,16 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("nper: r must be a scalar > -1"); + error ("nper: r must be a scalar > -1"); elseif (! is_scalar (p)) - error ("nper: p must be a scalar"); + error ("nper: p must be a scalar"); elseif (! is_scalar (a)) - error ("nper: a must be a scalar"); + error ("nper: a must be a scalar"); endif if (nargin == 5) if (! isstr (m)) - error ("nper: `method' must be a string"); + error ("nper: `method' must be a string"); endif elseif (nargin == 4) if (isstr (l)) diff --git a/scripts/finance/npv.m b/scripts/finance/npv.m --- a/scripts/finance/npv.m +++ b/scripts/finance/npv.m @@ -30,8 +30,8 @@ ## @end deftypefn ## @seealso{irr and pv} -## Author: KH -## Description: Net present value of a series of payments +## Author: KH +## Description: Net present value of a series of payments function v = npv (r, p, i) @@ -40,14 +40,14 @@ endif if (! (is_vector (p))) - error ("npv: p has to be a vector"); + error ("npv: p has to be a vector"); else n = length (p); p = reshape (p, 1, n); endif if (any (any (r <= -1))) - error ("npv: all interest rates must be > -1"); + error ("npv: all interest rates must be > -1"); endif if (is_scalar (r)) d = 1 ./ (1 + r) .^ (0 : n); @@ -59,7 +59,7 @@ if (nargin == 3) if (! is_scalar (i)) - error ("npv: I_0 must be a scalar"); + error ("npv: I_0 must be a scalar"); endif else i = 0; diff --git a/scripts/finance/pmt.m b/scripts/finance/pmt.m --- a/scripts/finance/pmt.m +++ b/scripts/finance/pmt.m @@ -28,8 +28,8 @@ ## @end deftypefn ## @seealso{pv, nper, and rate} -## Author: KH -## Description: Amount of periodic payment needed to amortize a loan +## Author: KH +## Description: Amount of periodic payment needed to amortize a loan function p = pmt (r, n, a, l, m) @@ -38,16 +38,16 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("pmt: rate must be a scalar > -1"); + error ("pmt: rate must be a scalar > -1"); elseif (! (is_scalar (n) && (n > 0))) - error ("pmt: n must be a positive scalar"); + error ("pmt: n must be a positive scalar"); elseif (! (is_scalar (a) && (a > 0))) - error ("pmt: a must be a positive scalar."); + error ("pmt: a must be a positive scalar"); endif if (nargin == 5) if (! isstr (m)) - error ("pmt: `method' must be a string"); + error ("pmt: `method' must be a string"); endif elseif (nargin == 4) if (isstr (l)) diff --git a/scripts/finance/pv.m b/scripts/finance/pv.m --- a/scripts/finance/pv.m +++ b/scripts/finance/pv.m @@ -31,8 +31,8 @@ ## @end deftypefn ## @seealso{pmt, nper, rate, and npv} -## Author: KH -## Description: Present value of an investment +## Author: KH +## Description: Present value of an investment function v = pv (r, n, p, l, m) @@ -41,11 +41,11 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("pv: r must be a scalar > -1"); + error ("pv: r must be a scalar > -1"); elseif (! (is_scalar (n) && (n > 0))) - error ("pv: n must be a positive scalar"); + error ("pv: n must be a positive scalar"); elseif (! is_scalar (p)) - error ("pv: p must be a scalar."); + error ("pv: p must be a scalar"); endif if (r != 0) @@ -57,7 +57,7 @@ if (nargin > 3) if (nargin == 5) if (! isstr (m)) - error ("pv: `method' must be a string"); + error ("pv: `method' must be a string"); endif elseif (isstr (l)) m = l; @@ -71,7 +71,7 @@ if (is_scalar (l)) v = v + pvl (r, n, l); else - error ("pv: l must be a scalar"); + error ("pv: l must be a scalar"); endif endif diff --git a/scripts/finance/pvl.m b/scripts/finance/pvl.m --- a/scripts/finance/pvl.m +++ b/scripts/finance/pvl.m @@ -24,8 +24,8 @@ ## not 5 percent). ## @end deftypefn -## Author: KH -## Description: Present value of an investment that pays off at the end +## Author: KH +## Description: Present value of an investment that pays off at the end function v = pvl (r, n, p) @@ -34,11 +34,11 @@ endif if (! (is_scalar (r) && (r > -1))) - error ("pvl: r has to be a scalar > -1"); + error ("pvl: r has to be a scalar > -1"); elseif (! (is_scalar (n) && (n > 0))) - error ("pvl: n has to be a positive scalar"); + error ("pvl: n has to be a positive scalar"); elseif (! is_scalar (p)) - error ("pvl: p has to be a scalar"); + error ("pvl: p has to be a scalar"); endif v = p / (1 + r)^n; diff --git a/scripts/finance/rate.m b/scripts/finance/rate.m --- a/scripts/finance/rate.m +++ b/scripts/finance/rate.m @@ -28,8 +28,8 @@ ## @end deftypefn ## @seealso{pv, pmt, nper, and npv} -## Author: KH -## Description: Rate of return of an investment +## Author: KH +## Description: Rate of return of an investment function r = rate (n, p, v, l, m) @@ -38,16 +38,16 @@ endif if (! (is_scalar (n) && (n > 0))) - error ("rate: n must be a positive scalar"); + error ("rate: n must be a positive scalar"); elseif (! is_scalar (p)) - error ("rate: p must be a scalar"); + error ("rate: p must be a scalar"); elseif (! is_scalar (v)) - error ("rate: p must be a scalar"); + error ("rate: p must be a scalar"); endif if (nargin == 5) if (! isstr (m)) - error ("rate: `method' must be a string"); + error ("rate: `method' must be a string"); endif elseif (nargin == 4) if (isstr (l)) @@ -62,7 +62,7 @@ endif if (! is_scalar (l)) - error ("rate: l must be a scalar"); + error ("rate: l must be a scalar"); endif [r, info] = fsolve (sprintf ("pv (x, %g, %g, %g, \"%s\") - %g", diff --git a/scripts/finance/vol.m b/scripts/finance/vol.m --- a/scripts/finance/vol.m +++ b/scripts/finance/vol.m @@ -25,8 +25,8 @@ ## volatility from @code{n*m} to @var{t}. ## @end deftypefn -## Author: FL -## Description: Volatility of financial time series data +## Author: FL +## Description: Volatility of financial time series data function retval = vol (X, m, n) @@ -38,12 +38,12 @@ if (nargin > 2) if (n * m > xr) - error ("vol: I need more data!"); + error ("vol: I need more data!"); endif else n = 1; if (n * m > xr) - error ("vol: I need more data!"); + error ("vol: I need more data!"); endif endif @@ -52,7 +52,7 @@ if (all (X)) U = X ((2 : xr), :) ./ X((1 : (xr-1)), :); else - error ("vol: zero element in X"); + error ("vol: zero element in X"); endif U = log(U); diff --git a/scripts/general/postpad.m b/scripts/general/postpad.m --- a/scripts/general/postpad.m +++ b/scripts/general/postpad.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {@var{x} =} postpad (@var{x}, @var{l}, @var{c}) ## See prepad. +## @end deftypefn ## Author: Tony Richardson ## Created: June 1994 diff --git a/scripts/general/triu.m b/scripts/general/triu.m --- a/scripts/general/triu.m +++ b/scripts/general/triu.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} triu (@var{a}, @var{k}) ## See tril. +## @end deftypefn ## Author: jwe diff --git a/scripts/image/colormap.m b/scripts/image/colormap.m --- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -63,10 +63,10 @@ if (! isempty (map)) if (columns (map) != 3) - error ("colormap: map must have 3 columns: [R,G,B]."); + error ("colormap: map must have 3 columns: [R,G,B]"); endif if (min (min (map)) < 0 || max (max (map)) > 1) - error ("colormap: map must have values in [0,1]."); + error ("colormap: map must have values in [0,1]"); endif ## Set the new color map __current_color_map__ = map; diff --git a/scripts/linear-algebra/dmult.m b/scripts/linear-algebra/dmult.m --- a/scripts/linear-algebra/dmult.m +++ b/scripts/linear-algebra/dmult.m @@ -20,8 +20,8 @@ ## @code{diag (@var{a}) * @var{b}} (but computed much more efficiently). ## @end deftypefn -## Author: KH -## Description: Rescale the rows of a matrix +## Author: KH +## Description: Rescale the rows of a matrix function M = dmult (a, B) @@ -31,7 +31,7 @@ s = size (a); if ((min (s) > 1) || (max (s) != rows (B))) - error ("dmult: a must be a vector of length rows (B)"); + error ("dmult: a must be a vector of length rows (B)"); endif M = (reshape (a, max (s), 1) * ones (1, columns (B))) .* B; diff --git a/scripts/linear-algebra/vech.m b/scripts/linear-algebra/vech.m --- a/scripts/linear-algebra/vech.m +++ b/scripts/linear-algebra/vech.m @@ -35,7 +35,7 @@ endif if (! is_square (x)) - error ("vech: x must be square"); + error ("vech: x must be square"); endif ## This should be quicker than having an inner `for' loop as well. diff --git a/scripts/miscellaneous/bincoeff.m b/scripts/miscellaneous/bincoeff.m --- a/scripts/miscellaneous/bincoeff.m +++ b/scripts/miscellaneous/bincoeff.m @@ -59,7 +59,7 @@ [retval, n, k] = common_size (n, k); if (retval > 0) - error ("bincoeff: n and k must be of common size or scalars"); + error ("bincoeff: n and k must be of common size or scalars"); endif [r, c] = size (n); diff --git a/scripts/miscellaneous/toc.m b/scripts/miscellaneous/toc.m --- a/scripts/miscellaneous/toc.m +++ b/scripts/miscellaneous/toc.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} toc () ## See tic. +## @end deftypefn ## Author: jwe diff --git a/scripts/plot/bottom_title.m b/scripts/plot/bottom_title.m --- a/scripts/plot/bottom_title.m +++ b/scripts/plot/bottom_title.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} bottom_title (@var{string}) ## See top_title. +## @end deftypefn ## Author: Vinayak Dutt ## Adapted-By: jwe diff --git a/scripts/plot/ylabel.m b/scripts/plot/ylabel.m --- a/scripts/plot/ylabel.m +++ b/scripts/plot/ylabel.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} ylabel (@var{string}) ## See xlabel. +## @end deftypefn ## Author: jwe diff --git a/scripts/plot/zlabel.m b/scripts/plot/zlabel.m --- a/scripts/plot/zlabel.m +++ b/scripts/plot/zlabel.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} zlabel (@var{string}) ## See xlabel. +## @end deftypefn ## Author: Vinayak Dutt ## Created: 3 July 95 diff --git a/scripts/polynomial/compan.m b/scripts/polynomial/compan.m --- a/scripts/polynomial/compan.m +++ b/scripts/polynomial/compan.m @@ -66,7 +66,7 @@ endif if (! is_vector (c)) - error("compan: expecting a vector argument."); + error ("compan: expecting a vector argument"); endif ## Ensure that c is a row vector. diff --git a/scripts/polynomial/polyder.m b/scripts/polynomial/polyder.m --- a/scripts/polynomial/polyder.m +++ b/scripts/polynomial/polyder.m @@ -17,7 +17,10 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} polyder (@var{c}) ## See polyderiv. +## @end deftypefn ## Author: jwe diff --git a/scripts/polynomial/polyval.m b/scripts/polynomial/polyval.m --- a/scripts/polynomial/polyval.m +++ b/scripts/polynomial/polyval.m @@ -41,7 +41,7 @@ endif if (! (is_vector (c) || isempty (c))) - error ("polyval: first argument must be a vector."); + error ("polyval: first argument must be a vector"); endif if (isempty (x)) diff --git a/scripts/polynomial/polyvalm.m b/scripts/polynomial/polyvalm.m --- a/scripts/polynomial/polyvalm.m +++ b/scripts/polynomial/polyvalm.m @@ -41,11 +41,11 @@ endif if (! (is_vector (c) || isempty (c))) - error ("polyvalm: first argument must be a vector."); + error ("polyvalm: first argument must be a vector"); endif if (! is_square (x)) - error("polyvalm: second argument must be a square matrix."); + error ("polyvalm: second argument must be a square matrix"); endif if (isempty (c)) diff --git a/scripts/quaternion/qderiv.m b/scripts/quaternion/qderiv.m --- a/scripts/quaternion/qderiv.m +++ b/scripts/quaternion/qderiv.m @@ -46,7 +46,7 @@ Omega = vec (Omega); if (length (Omega) != 3) - error ("qderivmat: Omega must be a length 3 vector."); + error ("qderivmat: Omega must be a length 3 vector"); endif Dmat = 0.5 * [ 0.0, Omega(3), -Omega(2), Omega(1); diff --git a/scripts/quaternion/qderivmat.m b/scripts/quaternion/qderivmat.m --- a/scripts/quaternion/qderivmat.m +++ b/scripts/quaternion/qderivmat.m @@ -46,7 +46,7 @@ Omega = vec (Omega); if (length (Omega) != 3) - error ("qderivmat: Omega must be a length 3 vector."); + error ("qderivmat: Omega must be a length 3 vector"); endif Dmat = 0.5 * [ 0.0, Omega(3), -Omega(2), Omega(1); diff --git a/scripts/quaternion/qtransv.m b/scripts/quaternion/qtransv.m --- a/scripts/quaternion/qtransv.m +++ b/scripts/quaternion/qtransv.m @@ -41,7 +41,7 @@ elseif (! is_vector (qib) || length (qib) != 4) error ("qtransv: q(%d,%d) must be a quaternion", rows (qib), columns (qib)); elseif (max (abs (imag (vb))) + max (abs (imag (qib))) != 0) - error ("qtransv: input values must be real."); + error ("qtransv: input values must be real"); endif qr = qib(4); diff --git a/scripts/quaternion/qtransvmat.m b/scripts/quaternion/qtransvmat.m --- a/scripts/quaternion/qtransvmat.m +++ b/scripts/quaternion/qtransvmat.m @@ -33,7 +33,7 @@ error ("qtransvmat: q(%d,%d) must be a quaternion", rows (qib), \ columns (qib)); elseif (max (abs (imag (qib))) != 0) - error("qtransvmat: input values must be real."); + error ("qtransvmat: input values must be real"); endif Aib = [(2.*(qib(1)^2 + qib(4)^2) -1.), diff --git a/scripts/quaternion/quaternion.m b/scripts/quaternion/quaternion.m --- a/scripts/quaternion/quaternion.m +++ b/scripts/quaternion/quaternion.m @@ -85,7 +85,7 @@ elseif (! is_scalar (theta)) error ("theta must be a scalar"); elseif (norm (vv) == 0) - error ("quaternion: vv is zero."); + error ("quaternion: vv is zero"); elseif (abs (norm (vv) - 1) > 1e-12) warning ("quaternion: ||vv|| != 1, normalizing") vv = vv / norm (vv); @@ -104,7 +104,7 @@ usage ("w = quaterion (a, b, c, d)"); endif if (! (is_scalar (w) && is_scalar (x) && is_scalar (y) && is_scalar (z))) - error ("input values must be scalars."); + error ("input values must be scalars"); endif a = [w, x, y, z]; diff --git a/scripts/signal/arch_test.m b/scripts/signal/arch_test.m --- a/scripts/signal/arch_test.m +++ b/scripts/signal/arch_test.m @@ -81,7 +81,7 @@ error ("arch_test: either rows(X) == length(y), or X is a scalar"); endif if (! (is_scalar(p) && (rem(p, 1) == 0) && (p > 0))) - error ("arch_test: p must be a positive integer."); + error ("arch_test: p must be a positive integer"); endif [b, v_b, e] = ols (y, X); diff --git a/scripts/specfun/betai.m b/scripts/specfun/betai.m --- a/scripts/specfun/betai.m +++ b/scripts/specfun/betai.m @@ -17,10 +17,14 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} betai (@var{a}, @var{b}, @var{x}) ## This function is provided for compatibility with older versions of ## Octave. New programs should use betainc instead. ## -## betai (a, b, x) is the same as betainc (x, a, b). +## @code{betai (@var{a}, @var{b}, @var{x})} is the same as @code{betainc +## (@var{x}, @var{a}, @var{b})}. +## @end deftypefn ## Author: jwe ## Created: 30 Jan 1998 diff --git a/scripts/specfun/gammai.m b/scripts/specfun/gammai.m --- a/scripts/specfun/gammai.m +++ b/scripts/specfun/gammai.m @@ -17,10 +17,14 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +## -*- texinfo -*- +## @deftypefn {Function File} {} gammai (@var{a}, @var{x}) ## This function is provided for compatibility with older versions of -## Octave. New programs should use gammainc instead. +## Octave. New programs should use @code{gammainc} instead. ## -## gammai (a, x) is the same as gammainc (x, a). +## @code{gammai (@var{a}, @var{x})} is the same as @code{gammainc +## (@var{x}, @var{a})}. +## @end deftypefn ## Author: jwe ## Created: 30 Jan 1998 diff --git a/scripts/statistics/base/center.m b/scripts/statistics/base/center.m --- a/scripts/statistics/base/center.m +++ b/scripts/statistics/base/center.m @@ -34,7 +34,7 @@ elseif is_matrix (x) retval = x - ones (rows (x), 1) * mean(x); else - error ("center: x must be a vector or a matrix."); + error ("center: x must be a vector or a matrix"); endif endfunction \ No newline at end of file diff --git a/scripts/statistics/base/cov.m b/scripts/statistics/base/cov.m --- a/scripts/statistics/base/cov.m +++ b/scripts/statistics/base/cov.m @@ -42,7 +42,7 @@ y = y'; endif if (rows (y) != n) - error ("cov: x and y must have the same number of observations."); + error ("cov: x and y must have the same number of observations"); endif x = x - ones (n, 1) * sum (x) / n; y = y - ones (n, 1) * sum (y) / n; diff --git a/scripts/statistics/base/kurtosis.m b/scripts/statistics/base/kurtosis.m --- a/scripts/statistics/base/kurtosis.m +++ b/scripts/statistics/base/kurtosis.m @@ -64,7 +64,7 @@ ind = find (s > 0); retval (ind) = sum (x (:, ind) .^ 4) ./ (nr * s (ind) .^ 4) - 3; else - error ("kurtosis: x has to be a matrix or a vector."); + error ("kurtosis: x has to be a matrix or a vector"); endif endfunction diff --git a/scripts/statistics/base/mahalanobis.m b/scripts/statistics/base/mahalanobis.m --- a/scripts/statistics/base/mahalanobis.m +++ b/scripts/statistics/base/mahalanobis.m @@ -39,7 +39,7 @@ [yr, yc] = size (Y); if (xc != yc) - error ("mahalanobis: X and Y must have the same number of columns."); + error ("mahalanobis: X and Y must have the same number of columns"); endif Xm = sum (X) / xr; diff --git a/scripts/statistics/base/ols.m b/scripts/statistics/base/ols.m --- a/scripts/statistics/base/ols.m +++ b/scripts/statistics/base/ols.m @@ -17,7 +17,7 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## -*- texinfo -*- +## -*- texinfo -*- ## @deftypefn {Function File} {[@var{beta}, @var{sigma}, @var{r}] =} ols (@var{y}, @var{x}) ## Ordinary least squares estimation for the multivariate model ## @iftex diff --git a/scripts/statistics/base/ppplot.m b/scripts/statistics/base/ppplot.m --- a/scripts/statistics/base/ppplot.m +++ b/scripts/statistics/base/ppplot.m @@ -47,7 +47,7 @@ endif if (! is_vector (x)) - error ("ppplot: x must be a vector."); + error ("ppplot: x must be a vector"); endif s = sort (x); diff --git a/scripts/statistics/base/qqplot.m b/scripts/statistics/base/qqplot.m --- a/scripts/statistics/base/qqplot.m +++ b/scripts/statistics/base/qqplot.m @@ -49,7 +49,7 @@ endif if (! (is_vector(x))) - error ("qqplot: x must be a vector."); + error ("qqplot: x must be a vector"); endif s = sort (x); diff --git a/scripts/statistics/base/skewness.m b/scripts/statistics/base/skewness.m --- a/scripts/statistics/base/skewness.m +++ b/scripts/statistics/base/skewness.m @@ -64,7 +64,7 @@ ind = find (s > 0); retval (ind) = sum (x (:, ind) .^ 3) ./ (nr * s (ind) .^ 3); else - error ("skewness: x has to be a matrix or a vector."); + error ("skewness: x has to be a matrix or a vector"); endif endfunction diff --git a/scripts/statistics/base/studentize.m b/scripts/statistics/base/studentize.m --- a/scripts/statistics/base/studentize.m +++ b/scripts/statistics/base/studentize.m @@ -42,7 +42,7 @@ t = x - l * mean (x); t = t ./ (l * max ([(std (t)); (! any (t))])); else - error ("studentize: x must be a vector or a matrix."); + error ("studentize: x must be a vector or a matrix"); endif endfunction \ No newline at end of file diff --git a/scripts/statistics/distributions/f_pdf.m b/scripts/statistics/distributions/f_pdf.m --- a/scripts/statistics/distributions/f_pdf.m +++ b/scripts/statistics/distributions/f_pdf.m @@ -27,7 +27,7 @@ function pdf = f_pdf (x, m, n) if (nargin != 3) - usage ("f_pdf (x, m, n)."); + usage ("f_pdf (x, m, n)"); endif [retval, x, m, n] = common_size (x, m, n); diff --git a/scripts/statistics/distributions/stdnormal_cdf.m b/scripts/statistics/distributions/stdnormal_cdf.m --- a/scripts/statistics/distributions/stdnormal_cdf.m +++ b/scripts/statistics/distributions/stdnormal_cdf.m @@ -31,7 +31,7 @@ [r_x, c_x] = size (x); if (r_x * c_x == 0) - error ("stdnormal_cdf: x must not be empty."); + error ("stdnormal_cdf: x must not be empty"); endif cdf = (ones (r_x, c_x) + erf (x / sqrt (2))) / 2; diff --git a/scripts/statistics/tests/hotelling_test.m b/scripts/statistics/tests/hotelling_test.m --- a/scripts/statistics/tests/hotelling_test.m +++ b/scripts/statistics/tests/hotelling_test.m @@ -41,14 +41,14 @@ if (is_vector (x)) if (! is_scalar (m)) - error ("hotelling_test: If x is a vector, m must be a scalar."); + error ("hotelling_test: if x is a vector, m must be a scalar"); endif n = length (x); p = 1; elseif (is_matrix (x)) [n, p] = size (x); if (n <= p) - error ("hotelling_test: x must have more rows than columns."); + error ("hotelling_test: x must have more rows than columns"); endif if (is_vector (m) && length (m) == p) m = reshape (m, 1, p); diff --git a/scripts/statistics/tests/hotelling_test_2.m b/scripts/statistics/tests/hotelling_test_2.m --- a/scripts/statistics/tests/hotelling_test_2.m +++ b/scripts/statistics/tests/hotelling_test_2.m @@ -49,7 +49,7 @@ if (is_vector (x)) n_x = length (x); if (! is_vector (y)) - error ("hotelling_test_2: If x is a vector, y must be too."); + error ("hotelling_test_2: if x is a vector, y must also be a vector"); else n_y = length (y); p = 1; diff --git a/scripts/statistics/tests/kolmogorov_smirnov_test.m b/scripts/statistics/tests/kolmogorov_smirnov_test.m --- a/scripts/statistics/tests/kolmogorov_smirnov_test.m +++ b/scripts/statistics/tests/kolmogorov_smirnov_test.m @@ -54,7 +54,7 @@ endif if (! is_vector (x)) - error ("kolmogorov_smirnov_test: x must be a vector."); + error ("kolmogorov_smirnov_test: x must be a vector"); endif n = length (x); diff --git a/scripts/statistics/tests/kolmogorov_smirnov_test_2.m b/scripts/statistics/tests/kolmogorov_smirnov_test_2.m --- a/scripts/statistics/tests/kolmogorov_smirnov_test_2.m +++ b/scripts/statistics/tests/kolmogorov_smirnov_test_2.m @@ -47,14 +47,14 @@ endif if (! (is_vector (x) && is_vector (y))) - error ("kolmogorov_smirnov_test_2: both x and y must be vectors."); + error ("kolmogorov_smirnov_test_2: both x and y must be vectors"); endif if (nargin == 2) alt = "!="; else if (! isstr (alt)) - error ("kolmogorov_smirnov_test_2: alt must be a string."); + error ("kolmogorov_smirnov_test_2: alt must be a string"); endif endif diff --git a/scripts/statistics/tests/t_test.m b/scripts/statistics/tests/t_test.m --- a/scripts/statistics/tests/t_test.m +++ b/scripts/statistics/tests/t_test.m @@ -46,10 +46,10 @@ endif if (! is_vector (x)) - error ("t_test: x must be a vector."); + error ("t_test: x must be a vector"); endif if (! is_scalar (m)) - error ("t_test: m must be a scalar."); + error ("t_test: m must be a scalar"); endif n = length (x); diff --git a/scripts/statistics/tests/z_test.m b/scripts/statistics/tests/z_test.m --- a/scripts/statistics/tests/z_test.m +++ b/scripts/statistics/tests/z_test.m @@ -46,13 +46,13 @@ endif if (! is_vector (x)) - error ("z_test: x must be a vector."); + error ("z_test: x must be a vector"); endif if (! is_scalar (m)) - error ("z_test: m must be a scalar."); + error ("z_test: m must be a scalar"); endif if (! (is_scalar (v) && (v > 0))) - error ("z_test: v must be a positive scalar."); + error ("z_test: v must be a positive scalar"); endif n = length (x); diff --git a/scripts/statistics/tests/z_test_2.m b/scripts/statistics/tests/z_test_2.m --- a/scripts/statistics/tests/z_test_2.m +++ b/scripts/statistics/tests/z_test_2.m @@ -49,7 +49,7 @@ error("z_test_2: both x and y must be vectors"); elseif (! (is_scalar (v_x) && (v_x > 0) && is_scalar (v_y) && (v_y > 0))) - error ("z_test_2: both v_x and v_y must be positive scalars."); + error ("z_test_2: both v_x and v_y must be positive scalars"); endif n_x = length (x); diff --git a/scripts/strings/com2str.m b/scripts/strings/com2str.m --- a/scripts/strings/com2str.m +++ b/scripts/strings/com2str.m @@ -41,7 +41,7 @@ endif if (! (is_scalar (zz) && is_scalar (flg))) - error("com2str: arguments must be a scalar."); + error ("com2str: arguments must be a scalar"); endif if (flg != 0 && flg != 1) diff --git a/scripts/strings/split.m b/scripts/strings/split.m --- a/scripts/strings/split.m +++ b/scripts/strings/split.m @@ -82,7 +82,7 @@ m = eval (sprintf ("str2mat (%s);", cmd)); else - error ("split: both s and t must be strings"); + error ("split: both s and t must be strings"); endif endfunction diff --git a/src/DLD-FUNCTIONS/inv.cc b/src/DLD-FUNCTIONS/inv.cc --- a/src/DLD-FUNCTIONS/inv.cc +++ b/src/DLD-FUNCTIONS/inv.cc @@ -110,7 +110,10 @@ // dynamic linking. DEFUN_DLD (inverse, args, nargout, - "inverse (X): inverse of a square matrix") + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {} inverse (@var{a})\n\ +See inv.\n\ +@end deftypefn") { return Finv (args, nargout); } diff --git a/src/DLD-FUNCTIONS/lpsolve.cc b/src/DLD-FUNCTIONS/lpsolve.cc --- a/src/DLD-FUNCTIONS/lpsolve.cc +++ b/src/DLD-FUNCTIONS/lpsolve.cc @@ -31,7 +31,10 @@ #include "oct-obj.h" DEFUN_DLD (lp_solve, , , - "lp_solve (): solve linear programs using lp_solve.") + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {} lp_solve ()\n\ +Not implemented yet...\n\ +@end deftypefn") { octave_value_list retval; @@ -48,10 +51,10 @@ } DEFUN_DLD (lp_solve_options, , , - "lp_solve_options (KEYWORD, VALUE)\n\ -\n\ -Set or show options for lp_solve. Keywords may be abbreviated\n\ -to the shortest match.") + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {} lp_solve_options ()\n\ +Not implemented yet...\n\ +@end deftypefn") { octave_value_list retval; diff --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -1586,10 +1586,16 @@ @end defvr"); DEFCONSTX ("SEEK_CUR", SBV_SEEK_CUR, 0.0, - "See SEEK_SET"); + "-*- texinfo -*-\n\ +@defvr {Built-in Variable} SEEK_CUR\n\ +See SEEK_SET.\n\ +@end defvr"); DEFCONSTX ("SEEK_END", SBV_SEEK_END, 1.0, - "See SEEK_SET"); + "-*- texinfo -*-\n\ +@defvr {Built-in Variable} SEEK_END\n\ +See SEEK_SET.\n\ +@end defvr"); DEFCONSTX ("stdin", SBV_stdin, stdin_file, "-*- texinfo -*-\n\ diff --git a/src/mappers.cc b/src/mappers.cc --- a/src/mappers.cc +++ b/src/mappers.cc @@ -167,11 +167,15 @@ @end deftypefn"); DEFUN_MAPPER (angle, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0, - "See arg."); + "-*- texinfo -*-\n\ +@deftypefn {Mapping Function} {} angle (@var{z})\n\ +See arg.\n\ +@end deftypefn"); DEFUN_MAPPER (arg, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0, "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} arg (@var{z})\n\ +@deftypefnx {Mapping Function} {} angle (@var{z})\n\ Compute the argument of @var{z}, defined as\n\ @iftex\n\ @tex\n\ diff --git a/src/pt-plot.cc b/src/pt-plot.cc --- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -1141,7 +1141,8 @@ } DEFUN_TEXT (set, args, nargout, - "This command is has been replaced by `gset'.") + "-*- texinfo -*-\n\ +This command is has been replaced by @code{gset}.") { warning ("set is obsolete -- use gset instead"); return Fgset (args, nargout); @@ -1178,7 +1179,8 @@ } DEFUN_TEXT (show, args, nargout, - "This command is has been replaced by `gshow'.") + "-*- texinfo -*-\n\ +This command is has been replaced by @code{gshow}.") { warning ("show is obsolete -- use gshow instead"); return Fgshow (args, nargout); diff --git a/src/syscalls.cc b/src/syscalls.cc --- a/src/syscalls.cc +++ b/src/syscalls.cc @@ -490,7 +490,10 @@ } DEFUN (lstat, args, , - "See stat.") + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{file})\n\ +See stat.\n\ +@end deftypefn") { octave_value_list retval; diff --git a/src/variables.cc b/src/variables.cc --- a/src/variables.cc +++ b/src/variables.cc @@ -961,10 +961,10 @@ } DEFUN_TEXT (whos, args, , - "whos [-all] [-builtins] [-functions] [-long] [-variables]\n\ -\n\ -List currently defined symbol(s). Options may be shortened to one\n\ -character, but may not be combined.") + "-*- texinfo -*-\n\ +@deffn {Command} whos options pattern @dots{}\n\ +See who.\n\ +@end deffn") { octave_value_list retval;