Mercurial > hg > octave-lyh
comparison scripts/plot/isosurface.m @ 16828:ddac88d32d6a
Make demos in plot m-files compatible with Matlab for running comparison script.
* scripts/plot/isosurface.m, scripts/plot/line.m, scripts/plot/mesh.m,
scripts/plot/plotyy.m, scripts/plot/printd.m, scripts/plot/semilogy.m,
scripts/plot/shrinkfaces.m, scripts/plot/stairs.m, scripts/plot/stem.m,
scripts/plot/stemleaf.m, scripts/plot/tetramesh.m: Replace double quote (")
with single quote ('). Use '%' for comment character. Use '...' for
line continuation.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 23 Jun 2013 14:47:05 -0700 |
parents | 5d3a684236b0 |
children | 905329f73b4a |
comparison
equal
deleted
inserted
replaced
16827:ac5313d94f20 | 16828:ddac88d32d6a |
---|---|
195 %! [x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2); | 195 %! [x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2); |
196 %! v = x.^2 + y.^2 + z.^2; | 196 %! v = x.^2 + y.^2 + z.^2; |
197 %! isosurface (x, y, z, v, 1); | 197 %! isosurface (x, y, z, v, 1); |
198 | 198 |
199 %!shared x, y, z, val | 199 %!shared x, y, z, val |
200 %! [x, y, z] = meshgrid (0:1, 0:1, 0:1); %% Points for single | 200 %! [x, y, z] = meshgrid (0:1, 0:1, 0:1); # Points for single |
201 %! val = [0, 0; 0, 0]; %% cube and a 3-D | 201 %! val = [0, 0; 0, 0]; # cube and a 3-D |
202 %! val(:,:,2) = [0, 0; 1, 0]; %% array of values | 202 %! val(:,:,2) = [0, 0; 1, 0]; # array of values |
203 %!test | 203 %!test |
204 %! fv = isosurface (x, y, z, val, 0.3); | 204 %! fv = isosurface (x, y, z, val, 0.3); |
205 %! assert (isfield (fv, "vertices"), true); | 205 %! assert (isfield (fv, "vertices"), true); |
206 %! assert (isfield (fv, "faces"), true); | 206 %! assert (isfield (fv, "faces"), true); |
207 %! assert (size (fv.vertices), [3 3]); | 207 %! assert (size (fv.vertices), [3 3]); |