How to preserve meshgrid compatibility after rotation

조회 수: 1 (최근 30일)
AP
AP 2012년 10월 28일
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
AP
AP 2012년 10월 29일
This is the error message that I get in Matlab.
Matt J
Matt J 2012년 10월 29일
편집: Matt J 2012년 10월 29일
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 ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2012년 10월 29일
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
Matt J
Matt J 2012년 10월 29일
편집: Matt J 2012년 10월 29일
It would still form a lattice, but the new x-coordinates would not be monotonically increasing.
Walter Roberson
Walter Roberson 2012년 10월 29일
isosurface() requires that the X and Y be monotonic, not that they be monotonic increasing.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scalar Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by