sparam EMTTOOL sph2pol

EMTTOOL >> EMTTOOL > sph2cart

sph2cart

Transform spherical to Cartesian coordinates

Calling Sequence

[x,y,z]=cart2pol(r,theta,phi)

Parameters

r

radius

theta

elevation angle

phi

azimuth angle

x,y,z

x,y,z coordinates

Description

cart2pol(r,theta,phi) transforms corresponding elements of data stored in spherical coordinates (radius r, elevation angle theta, azimuth angle phi) to Cartesian coordinates X,Y,Z. phi and theta are in radians. The arrays r,theta and phi must be the same size (or any of them can be scalar).

Examples

add sample pgm

See Also

Author

sparam EMTTOOL sph2pol