Wed 21 Dec 2011 11:13:05 AM UTC, original submission:
the second demo of slice.m fails
----------------------------------------------
/pub/hg/octave/scripts/plot/slice.m example 2:
[xi, yi] = meshgrid (linspace (-7, 7));
zi = xi + yi;
slice (x, y, z, v, xi, yi, zi);
/pub/hg/octave/scripts/plot/slice.m example 2: failed
`x' undefined near line 5 column 9
-----------------------------------------------
I presume the intention was to reuse the variables defined on
first demo, but they are not shared (is it possible ?),
so it should be instead:
%! [x, y, z] = meshgrid (linspace (-8, 8, 32));
%! v = sin (sqrt (x.^2 + y.^2 + z.^2)) ./ (sqrt (x.^2 + y.^2 + z.^2));
%! [xi, yi] = meshgrid (linspace (-7, 7));
%! zi = xi + yi;
%! slice (x, y, z, v, xi, yi, zi);
|