How do I plot a 3-d matrix.( error with surf)

1 view (last 30 days)
I have a 321x60x120 matrix. The matrix has positive and negative float values. I would like to plot it. I tried surf. I get an error saying : "Error using matlab.graphics.chart.primitive.Surface
Value must be a scalar, vector or array of numeric type.". Values are all numeric. What could be wrong?
Is there any other plotting function, that would be recommended. The values are positions and momentums of a 2-d system, that evolve over time. time is the first dimension. The first 60 in the 3rd dimension are positions and the next 60 are momentum of this 2-d system. Ideally, what I want to do, is plot, for each iteration, a 3-d plot for each set of 60 rows and 60 columns of position and then a 3-d plot for each set of 60 rows and 60 positions of momentum, and show the evolution over time.
  3 Comments
savitha muthanna
savitha muthanna on 20 Apr 2021
Edited: savitha muthanna on 20 Apr 2021
isosurface plots isosurface data from volume data - is it equivalent to surf? And what does the error mean?

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!