Transform Cylindrical polar coordinates to Cartesan but equally distributed
이전 댓글 표시
I have polar coordinates in R Phi and Z.
R and Phi were constructed by
R_lin=linspace(0,1,100)
Phi_lin=linspace(0,2*pi,100)
[r_mesh,phi_mesh]=meshgrid(R_lin,Phi_lin)
, so for every value to the next there is a equally difference in Radius an Phi. (The bigger your R gets, the less values you have on your circle.)
R,Phi,Z are all Matrixes 100x100. (Z was created by some loops, where the values were entered du to the position of R and Phi).
So if we combind the three values of R,Phi,Z on the same index we get the position of a point.
If I now use pol2cat i get three Matrixes all 100 by 100 for x,y,z. Just for plotting this works fine, but I now want to work further with that data in cartesian coordinates.
How can I change my Matrixes so that X goes from -1 to 1 row-wise and y from -1 to 1 colum-wise and the z values get sorted corresponded to the new indexes in x,y. Even better would be if i could apply some kind of interpolation to make x and y even distributed (same difference between points).
So i can work with the data as if I would have created it with a meshgrid.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!