Mercurial > hg > octave-lojdl
changeset 1518:84bd88b8acee
[project @ 1995-10-04 03:35:16 by jwe]
author | jwe |
---|---|
date | Wed, 04 Oct 1995 03:45:06 +0000 |
parents | 5a02b9fba19e |
children | 9476d5e099ea |
files | scripts/control/abcddim.m scripts/control/are.m scripts/general/tril.m scripts/general/triu.m scripts/image/saveimage.m scripts/linear-algebra/kron.m scripts/linear-algebra/norm.m scripts/miscellaneous/etime.m scripts/plot/__plr__.m scripts/plot/__plt__.m scripts/plot/contour.m scripts/plot/mesh.m scripts/special-matrix/hankel.m scripts/special-matrix/toeplitz.m |
diffstat | 14 files changed, 31 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/control/abcddim.m +++ b/scripts/control/abcddim.m @@ -32,7 +32,7 @@ # Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993. if (nargin != 4) - error ("abcddim: invalid number of arguments. need four.") + error ("usage: abcddim (a, b, c, d)"); endif n = m = p = -1;
--- a/scripts/control/are.m +++ b/scripts/control/are.m @@ -83,7 +83,7 @@ n2 = 2 * n; x = u (n1:n2, 1:n) / u (1:n, 1:n); else - usage ("x = are (a, b, c)") + usage ("x = are (a, b, c)"); endif endfunction
--- a/scripts/general/tril.m +++ b/scripts/general/tril.m @@ -34,7 +34,7 @@ k = 0; elseif (nargin == 2) if ((k > 0 && k > nc) || (k < 0 && k < -nr)) - error ("tril: requested diagonal out of range") + error ("tril: requested diagonal out of range"); endif else usage ("tril (x [, k])");
--- a/scripts/general/triu.m +++ b/scripts/general/triu.m @@ -34,7 +34,7 @@ k = 0; elseif (nargin == 2) if ((k > 0 && k > nc) || (k < 0 && k < -nr)) - error ("triu: requested diagonal out of range") + error ("triu: requested diagonal out of range"); endif else usage ("triu (x [, k])");
--- a/scripts/image/saveimage.m +++ b/scripts/image/saveimage.m @@ -170,7 +170,6 @@ for i = 2:n_long tmp = tmp + img (i:8:img_sz) * 2^(8-i); endfor - size (tmp) for i = (n_long+1):8 tmp(1:s_len) = tmp(1:s_len) + img (i:8:img_sz) * 2^(8-i); endfor @@ -216,7 +215,7 @@ elseif (strcmp (img_form, "ps") == 1) if (! grey) - error ("must have a greyscale color map for conversion to PostScript") + error ("must have a greyscale color map for conversion to PostScript"); endif bps = 8; @@ -285,7 +284,7 @@ count = 0; for i = 1:img_sz - fprintf (fid, "%x", img (i)) + fprintf (fid, "%x", img (i)); if (++count == 30) count = 0; fprintf (fid, "\n");
--- a/scripts/linear-algebra/kron.m +++ b/scripts/linear-algebra/kron.m @@ -36,7 +36,7 @@ x = a (1, 1) * b; for ii = 2:ma - tmp = a (ii, 1) * b + tmp = a (ii, 1) * b; x = [x; tmp]; endfor
--- a/scripts/linear-algebra/norm.m +++ b/scripts/linear-algebra/norm.m @@ -45,7 +45,7 @@ # See also: cond, svd if (nargin < 1 || nargin > 2) - error ("usage: norm (x [, p])") + error ("usage: norm (x [, p])"); endif if (isempty (x))
--- a/scripts/miscellaneous/etime.m +++ b/scripts/miscellaneous/etime.m @@ -32,7 +32,7 @@ if (is_vector (t1) && length (t1) == 6 && is_vector (t0) && length (t0) == 6) if (t1 (1) != t0 (1)) - error ("etime: can't handle timings over year boundaries yet") + error ("etime: can't handle timings over year boundaries yet"); endif # XXX FIXME XXX -- could check here to ensure that t1 and t0 really do
--- a/scripts/plot/__plr__.m +++ b/scripts/plot/__plr__.m @@ -21,7 +21,7 @@ if (nargin == 1) [nr, nc] = size (theta); if (nr == 1) - theta = theta'; + theta = theta.'; tmp = nr; nr = nc; nc = tmp; @@ -55,10 +55,10 @@ error ("polar: vector lengths must match"); endif if (rows (rho) == 1) - rho = rho'; + rho = rho.'; endif if (rows (theta) == 1) - theta = theta'; + theta = theta.'; endif x = rho .* cos (theta); y = rho .* sin (theta); @@ -66,14 +66,14 @@ elseif (is_matrix (rho)) [t_nr, t_nc] = size (theta); if (t_nr == 1) - theta = theta'; + theta = theta.'; tmp = t_nr; t_nr = t_nc; t_nc = tmp; endif [r_nr, r_nc] = size (rho); if (t_nr != r_nr) - rho = rho' + rho = rho.'; tmp = r_nr; r_nr = r_nc; r_nc = tmp; @@ -89,14 +89,14 @@ if (is_vector (rho)) [r_nr, r_nc] = size (rho); if (r_nr == 1) - rho = rho'; + rho = rho.'; tmp = r_nr; r_nr = r_nc; r_nc = tmp; endif [t_nr, t_nc] = size (theta); if (r_nr != t_nr) - theta = rho' + theta = rho.'; tmp = t_nr; t_nr = t_nc; t_nc = tmp;
--- a/scripts/plot/__plt__.m +++ b/scripts/plot/__plt__.m @@ -47,17 +47,17 @@ endif fmt = plot_opt (caller, new); if (! y_set) - plot_int_1 (x, fmt) + plot_int_1 (x, fmt); else - plot_int_2 (x, y, fmt) + plot_int_2 (x, y, fmt); endif - hold on + hold on; x_set = 0; y_set = 0; elseif (x_set) if (y_set) plot_int_2 (x, y, fmt); - hold on + hold on; x = new; y_set = 0; else @@ -84,7 +84,7 @@ unwind_protect_cleanup if (! hold_state) - hold off + hold off; endif end_unwind_protect
--- a/scripts/plot/contour.m +++ b/scripts/plot/contour.m @@ -32,11 +32,11 @@ if (is_matrix (z)) set nosurface; set contour; - set cntrparam bspline + set cntrparam bspline; command = sprintf ("set cntrparam levels %d", n); eval (command); set noparametric; - set view 0, 0, 1.9, 1 + set view 0, 0, 1.9, 1; gsplot z w l 1; else error ("mesh: argument must be a matrix"); @@ -58,13 +58,13 @@ zz(:,i+2) = z(:,k); k++; endfor - set nosurface - set contour - set cntrparam bspline + set nosurface; + set contour; + set cntrparam bspline; command = sprintf ("set cntrparam levels %d", n); eval (command); set parametric; - set view 0, 0, 1.9, 1 + set view 0, 0, 1.9, 1; gsplot zz w l 1; else msg = "mesh: rows (z) must be the same as length (x) and";
--- a/scripts/plot/mesh.m +++ b/scripts/plot/mesh.m @@ -31,7 +31,7 @@ set surface; set nocontour; set noparametric; - set view 60, 30, 1, 1 + set view 60, 30, 1, 1; gsplot (z); else error ("mesh: argument must be a matrix"); @@ -58,7 +58,7 @@ set surface; set nocontour; set parametric; - set view 60, 30, 1, 1 + set view 60, 30, 1, 1; gsplot (zz); else msg = "mesh: rows (z) must be the same as length (x) and";
--- a/scripts/special-matrix/hankel.m +++ b/scripts/special-matrix/hankel.m @@ -39,7 +39,7 @@ [r_nr, r_nc] = size (r); if ((c_nr != 1 && c_nc != 1) || (r_nr != 1 && r_nc != 1)) - error ("hankel: expecting vector arguments") + error ("hankel: expecting vector arguments"); endif if (nargin == 1)
--- a/scripts/special-matrix/toeplitz.m +++ b/scripts/special-matrix/toeplitz.m @@ -39,7 +39,7 @@ [r_nr, r_nc] = size (r); if ((c_nr != 1 && c_nc != 1) || (r_nr != 1 && r_nc != 1)) - error ("toeplitz: expecting vector arguments") + error ("toeplitz: expecting vector arguments"); endif if (c_nc != 1)