Borrar filtros
Borrar filtros

3d plot

1 visualización (últimos 30 días)
franz
franz el 21 de Abr. de 2012
Hi! I have a vector lets say x=1:81 and the same for y and z and I would like to plot it with surf. My problem is that I need to reorganise my vectors to grids so I tried meshgrid but I don't now if i understood it, becouse i would like a grid that has the size 9x9 but I got one with 81x81 am I doing something wrong or is it some other way to solve this problem?

Respuesta aceptada

Wayne King
Wayne King el 21 de Abr. de 2012
meshgrid() returning 81x81 for situation you describe is correct, but what you indicate seems that you want to first reshape your x,y, and z vectors in 9x9 matrices
x1 = reshape(x,9,9);
y1 = reshape(y,9,9);
z1 = reshape(z,9,9);
surf(x1,y1,z1);
Not sure if that makes sense for your data.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by