Mercurial > hg > octave-nkf
changeset 4912:048db020498c
[project @ 2004-07-22 20:45:59 by jwe]
author | jwe |
---|---|
date | Thu, 22 Jul 2004 20:45:59 +0000 |
parents | 14027e0bafa4 |
children | c8368716bab3 |
files | scripts/image/imshow.m scripts/plot/figure.m src/DLD-FUNCTIONS/dassl.cc |
diffstat | 3 files changed, 17 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -68,12 +68,12 @@ if (mvars != 3) I = varargin{1}; - if iscomplex (I) - warning("imshow: displaying real part of complex image"); + if (iscomplex (I)) + warning ("imshow: displaying real part of complex image"); I = real (I); endif if (max (I(:)) <= 1) - # image in [0-1]; scale to [0-255] + ## image in [0-1]; scale to [0-255] I = I * 255; M = gray (256); endif @@ -82,7 +82,7 @@ if (mvars == 1) ## imshow (x) ## Grayscale image [0-N] -- estimate gray levels. - N = 2^ceil (log2 (max(I(:)))); + N = 2 ^ ceil (log2 (max (I(:)))); if (N <= 65536) M = gray (N); else @@ -101,9 +101,11 @@ g = varargin{2}; b = varargin{3}; tmp = [r; g; b]; - if iscomplex (tmp) - warning("imshow: displaying real part of complex rgb image"); - r = real (r); g = real (g); b = real (b); + if (iscomplex (tmp)) + warning ("imshow: displaying real part of complex rgb image"); + r = real (r); + g = real (g); + b = real (b); endif if (max (tmp(:)) > 1) ## Normalise to [0-1].
--- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -21,8 +21,8 @@ ## @deftypefn {Function File} {} figure (@var{n}) ## Set the current plot window to plot window @var{n}. This function ## currently requires X11 and a version of gnuplot that supports multiple -## frames. If N is not specified, the next available window number is -## chosen. +## frames. If @var{N} is not specified, the next available window +## number is chosen. ## @end deftypefn ## Author: jwe
--- a/src/DLD-FUNCTIONS/dassl.cc +++ b/src/DLD-FUNCTIONS/dassl.cc @@ -178,17 +178,20 @@ "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{istate}, @var{msg}] =} dassl (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t}, @var{t_crit})\n\ Solve the set of differential-algebraic equations\n\ +@iftex\n\ @tex\n\ $$ 0 = f (x, \\dot{x}, t) $$\n\ with\n\ $$ x(t_0) = x_0, \\dot{x}(t_0) = \\dot{x}_0 $$\n\ @end tex\n\ +@end iftex\n\ @ifinfo\n\ \n\ @example\n\ 0 = f (x, xdot, t)\n\ @end example\n\ \n\ +@noindent\n\ with\n\ \n\ @example\n\ @@ -220,14 +223,16 @@ the function @math{f} described above, and the second element names\n\ a function to compute the modified Jacobian\n\ \n\ +@iftex\n\ @tex\n\ $$\n\ J = {\\partial f \\over \\partial x}\n\ + c {\\partial f \\over \\partial \\dot{x}}\n\ $$\n\ @end tex\n\ +@end iftex\n\ +@ifinfo\n\ @example\n\ -@ifinfo\n\ df df\n\ jac = -- + c ------\n\ dx d xdot\n\