Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
7330:55f35e469c43 | 7331:3ed85de5922c |
---|---|
74 %!demo | 74 %!demo |
75 %! [x, y, z] = peaks (); | 75 %! [x, y, z] = peaks (); |
76 %! contour (x, y, z); | 76 %! contour (x, y, z); |
77 | 77 |
78 %!demo | 78 %!demo |
79 %! [th, r] = meshgrid (linspace (0, 2*pi, 64), 0:.05:0.9); | 79 %! [theta, r] = meshgrid (linspace (0, 2*pi, 64), linspace(0,1,64)); |
80 %! [X, Y] = pol2cart (th, r); | 80 %! [X, Y] = pol2cart (theta, r); |
81 %! f = ((X + i*Y).^4 - 1).^(1/4); | 81 %! Z = sin(2*theta).*(1-r); |
82 %! contour(X, Y, abs(f), 16) | 82 %! contour(X, Y, abs(Z), 10) |