MATLAB Answers

0

Z must be matrix, how to determine size of reshape

Asked by Naftalie Rianty on 22 Jul 2019
Latest activity Answered by Image Analyst
on 23 Jul 2019
I have this x,y,z coordinates How to determine the size for reshape and make the surface of the coordinates? Thanks

  4 Comments

Show 1 older comment
If I enter the points using the scatter3 function the results are like this? Are there other ways besides reshape?
Is there supposed to be an attachment or embedded image?
Please elaborate the meaning of "I have this x,y,z coordinates".

Sign in to comment.

1 Answer

Answer by Image Analyst
on 23 Jul 2019

If they're in a grid in an N-by-3 array, extract them first
x = xyz(:, 1);
y = xyz(:, 2);
z = xyz(:, 3);
Then try
surf(x, y, z);
If you don't have a regular grid, use scatteredInterpolant() to get one.

  0 Comments

Sign in to comment.