- #1
mikeph
- 1,235
- 18
Using "surf" function to plot slices of a 3D matrix
Hello
I have a 100x100x100 matrix called "A" and want to plot 2D slices of it to get a feel of where the global minima are (since there is no other way which I know of visualising it... is there?)
If I take a slice of the third component, eg. "surf(A(:,:,50))" it will plot it fine, but I cannot do this for the other two:
Is there a simple workaround for this?
Thanks
Hello
I have a 100x100x100 matrix called "A" and want to plot 2D slices of it to get a feel of where the global minima are (since there is no other way which I know of visualising it... is there?)
If I take a slice of the third component, eg. "surf(A(:,:,50))" it will plot it fine, but I cannot do this for the other two:
Code:
>>> surf(A(1,:,:))
? Error using ==> surf at 74
Z must be a matrix, not a scalar or vector.
Is there a simple workaround for this?
Thanks