Home > freetb4matlab > general > cart2sph.m

cart2sph

PURPOSE ^

% Transform Cartesian to spherical coordinates.

SYNOPSIS ^

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

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{theta}, @var{phi}, @var{r}] =} cart2sph (@var{x}, @var{y}, @var{z})
% Transform Cartesian to spherical coordinates.
% @var{x}, @var{y} and @var{z} must be the same shape, or scalar.
% @var{theta} describes the angle relative to the positive x-axis.
% @var{phi} is the angle relative to the xy-plane.
% @var{r} is the distance to the origin (0, 0, 0).
% @seealso{pol2cart, cart2pol, sph2cart}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003