transform a matrix with polar coordinates into a matrix with cartesian coordinates
Show older comments
hi, I have two sets of data, each of which I need to process. After the transformation a matrix must come out at the end of each.
i found two approaches. once you can plot them and put a meshgrid on them, and then convert the newly found points. Or you can somehow use pol2cart.
This is recorded data in a helix structure. Always the angle and the radius.

the original matrix data looks like this with imagesc https://imgur.com/a/YT7wuec
and I know something like that is supposed to come out: https://imgur.com/a/toYaqDC
in the lines is the radius, and in the columns the angle.
now I want to convert my single elements in the matrix PolMat into cartesian coordinates. And save this matrix as CartMat.
thanks for the help
MATLAB Version: 9.8.0.1380330 (R2020a) Update 2
Answers (1)
Read about pol2cart.
9 Comments
Max M
on 7 Jul 2020
KSSV
on 7 Jul 2020
[x,x,z] = pol2cart(A, R, PolMat);
pol2cart accepts only two inputs.....are you looking for sph2cart ?
https://in.mathworks.com/help/matlab/ref/sph2cart.html..If not share the data.
KSSV
on 7 Jul 2020
I have just checked your DataSet....you got a matrix of size 512*1000...you want to wrap this matrix into a helix ?
KSSV
on 7 Jul 2020
[x,y,z] = pol2cart(A, R, PolMat);
z = double(z) ;
In the above x, y, z are matrices already.
KSSV
on 7 Jul 2020
When you try
surf(z)
pcolor(z)
also you will get back your original value. By specifying x,y, you can plot it as a circle or as what you wanted.
Max M
on 7 Jul 2020
Categories
Find more on Calendar in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!