How can I transform cartesian coordinate matrix in a polar coordinate matrix
3 views (last 30 days)
Show older comments
Hi everyone,
I am looking for a way to transform a m*n matrix (Digital Elevation Model) that is in cartesian coordinates in another matrix in polar coordinates, from a given origin (x0, y0).
[m,n] = size(DEM); [x,y] = meshgrid(1:n,1:m); [theta,rho] = cart2pol(x-x0,y-yo); %get polar coordinates from x0,y0
However now, how to get a matrix out of this showing theta vs rho ?
figure, pcolor(theta,rho,DEM)
shows a weird result...
Any idea ? Thanks you Eric
0 Comments
Answers (0)
See Also
Categories
Find more on Polar Plots 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!