Transform Polar to spherical coordinates
[r,theta,phi]=pol2sph(phi,p,z)
azimuth angle
radius in xy plane
z coordinate
radius
elevation angle
pol2sph(phi,p,z) transforms corresponding elements of data stored in Polar coordinates phi,p,z to spherical coordinates (radius r, elevation angle theta, azimuth angle phi). phi and theta are returned in radians. The arrays phi,p, and z must be the same size (or any of them can be scalar).
add sample pgm