undisired grid size with meshgrid
Show older comments
Hi: I have a three 1-D constant space matrix, and I want to use them to generate a 3D space mesh.
the size of each is x: 1*532, y: 1*357, z:1*1072.
after I used the meshgrid:
[X,Y,Z]=meshgrid(x,y,z);
the size of X, Y, Z are : 357*532*1072. but I think they should be: 532*357*1072.
is there any problem with my operation?
Thanks! Li
Accepted Answer
More Answers (1)
Matt J
on 16 Jan 2018
Use ndgrid instead
[X,Y,Z]=ndgrid(x,y,z);
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!