Different assignment of coordinates in meshgrid().

6 visualizaciones (últimos 30 días)
Andre Rieger
Andre Rieger el 29 de En. de 2020
Respondida: KSSV el 27 de Oct. de 2020
Dear all,
I guess my question is simple to answer, however I am stuck.
I have data in 3d space stored in a 3D array, where the columns are the y coordinate, the rows the z coordinate and the "depth" of the matrix is the x-coordinate. Now I'd like to plot the data with slice and quiver but just can't figure out how to assign x, y and z in my coordinate system to the meshgrid function in order to get the right coordinate grids.
Any help or insight you can provide is very much appreciated.
  1 comentario
Milan Padhiyar
Milan Padhiyar el 27 de Oct. de 2020
Hello,
Can you please give some more details on the issue that you are facing regarding assigning the coordinates to the “meshgrid” function?

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 27 de Oct. de 2020
Let A be your 3D matrix.
[m,n,p] = size(A) ;
[X,Y,Z] = meshgrid(1:p,1:n,1:m) ;

Categorías

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

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by