Mercurial > hg > octave-lyh
diff scripts/plot/contour.m @ 7331:3ed85de5922c
[project @ 2007-12-21 17:40:20 by jwe]
author | jwe |
---|---|
date | Fri, 21 Dec 2007 17:41:35 +0000 |
parents | 9af6f0a214ee |
children | ac7f334d9652 |
line wrap: on
line diff
--- 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)