How to preserve meshgrid compatibility after rotation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear All,
I have generated a vector field in 3D. the coordinates are created by meshgrid. Now I need to rotate the domain 90° about y-axis. When I do this and try to plot the isosurface of some values, I get the following error:
Input grid is not a valid MESHGRID.
How can I solve this problem?
Thanks,
Ahmad
3 Kommentare
Matt J
am 29 Okt. 2012
Bearbeitet: Matt J
am 29 Okt. 2012
How are you performing the rotation? A 90 degree rotation about y should transform (x,y,z) to (z,y,-x). Are you doing this formula directly, or are you using trigonometric functions to generate rotation matrices? If you are using trig functions are you using COS & SIN or are you using COSD & SIND ?
Antworten (1)
Matt J
am 29 Okt. 2012
You can't perform a coordinate transformation on a meshgrid and still expect it to be a meshgrid. Only certain transforms like translations preserve a mesh. Use griddata or TriScatterdInterp to obtain gridded samples.
3 Kommentare
Walter Roberson
am 29 Okt. 2012
isosurface() requires that the X and Y be monotonic, not that they be monotonic increasing.
Siehe auch
Kategorien
Mehr zu Volume Visualization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!