(adsbygoogle = window.adsbygoogle || []).push({}); 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?Code (Text):>>> surf(A(1,:,:))

??? Error using ==> surf at 74

Z must be a matrix, not a scalar or vector.

Thanks

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Using surf function to plot slices of a 3D matrix

Loading...

Similar Threads - Using surf function | Date |
---|---|

Using Maxima to plot error in Fourier series | Nov 5, 2017 |

Matlab Solving equation with integration using MATLAB | Aug 4, 2017 |

What Software do you use to do your math manipulations? | May 21, 2017 |

MATLAB-saving data after loops for surf plot | Apr 14, 2012 |

**Physics Forums - The Fusion of Science and Community**