Mercurial > hg > octave-avbm
changeset 7331:3ed85de5922c
[project @ 2007-12-21 17:40:20 by jwe]
author | jwe |
---|---|
date | Fri, 21 Dec 2007 17:41:35 +0000 |
parents | 55f35e469c43 |
children | 74b372fffa72 |
files | scripts/ChangeLog scripts/image/imshow.m scripts/plot/contour.m scripts/plot/contourf.m |
diffstat | 4 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2007-12-21 Soren Hauberg <hauberg@gmail.com> + + * image/imshow.m: Accept empty value for display_range. + 2007-12-20 Michael Goffioul <michael.goffioul@gmail.com> * pkg/pkg.m: Add .lib as architecture-dependent suffix.
--- a/scripts/image/imshow.m +++ b/scripts/image/imshow.m @@ -92,7 +92,7 @@ while (narg <= numel (varargin)) arg = varargin{narg++}; if (isnumeric (arg)) - if (numel (arg) == 2) + if (numel (arg) == 2 || isempty (arg)) display_range = arg; elseif (columns (arg) == 3) indexed = true;
--- a/scripts/plot/contour.m +++ b/scripts/plot/contour.m @@ -76,7 +76,7 @@ %! contour (x, y, z); %!demo -%! [th, r] = meshgrid (linspace (0, 2*pi, 64), 0:.05:0.9); -%! [X, Y] = pol2cart (th, r); -%! f = ((X + i*Y).^4 - 1).^(1/4); -%! contour(X, Y, abs(f), 16) +%! [theta, r] = meshgrid (linspace (0, 2*pi, 64), linspace(0,1,64)); +%! [X, Y] = pol2cart (theta, r); +%! Z = sin(2*theta).*(1-r); +%! contour(X, Y, abs(Z), 10)
--- a/scripts/plot/contourf.m +++ b/scripts/plot/contourf.m @@ -260,7 +260,7 @@ %! contourf (x, y, z, -7:9) %!demo -%! [th, r] = meshgrid (linspace (0, 2*pi, 64), 0:.05:0.9); -%! [X, Y] = pol2cart (th, r); -%! f = ((X + i*Y).^4 - 1).^(1/4); -%! contourf(X, Y, abs(f), 16) +%! [theta, r] = meshgrid (linspace (0, 2*pi, 64), linspace(0,1,64)); +%! [X, Y] = pol2cart (theta, r); +%! Z = sin(2*theta).*(1-r); +%! contourf(X, Y, abs(Z), 10)