MATLAB: Convert data plot from Cartesian to spherical coordinates

carteesian to sphericalcoordinate transform

I have data plot shown below where the 'x' and 'y' coordiantes corresponds to the cartessian coordinates sin(theta) cos(phi) and sin(theta) sin(phi). I would like to obtain a plot where the 'x' and 'y' coordinates are theta and phi. Is there a command in Matlab that performs this coordinate transformation? theta and phi are the spherical coordinates.

Best Answer

See if the cart2sph function will do what you want.
Related Question