Sun 01 Aug 2010 11:41:19 AM UTC, original submission:
Received the following description from Andrew Lund:
> Hi, I'm not entirely sure if this is a bug or not, but lines 133-134 in
> isosurface.m read:
>
> [n1, n2, n3] = size (val);
> [x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);
>
> when I think they should read:
>
> [n1, n2, n3] = size (val);
> [x, y, z] = meshgrid (1:n2, 1:n1, 1:n3);
>
> meshgrid considers x to be columns and y to be rows, opposite of what
> matrix indices use. This came up because I tried to use FV =
> isosurface(z,iso), and kept getting an error from marching cube
> complaining xx, yy, zz and c are not equal sizes.
>
> I don't know if there is another place to submit bug reports, but I figured
> since you wrote it, you could figure it out.
>
> Please let me know if this is a bug or not,
>
> Andrew
>
I can confirm that this is really a bug and should be
[n2, n1, n3] = size (val);
[x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);
Can be reproduced by invoking
X = rand(10, 20, 30);
isosurface(X, 0.5);
Changeset attached.
|