How can I transform cartesian coordinate matrix in a polar coordinate matrix

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

Answers (0)

Categories

Asked:

on 14 Mar 2013

Community Treasure Hunt

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

Start Hunting!