Code covered by the BSD License  

Highlights from
Curvilinear Coordinates

from Curvilinear Coordinates by Howard Wilson
Programs are presented which use symbolic math, curvilinear coordinates, and tensor concepts.

[X,Y,Z]=sphr0(r,t,p)
function [X,Y,Z]=sphr0(r,t,p)
% [X,Y,Z]=sphr0(r,t,p) defines spherical
% coordinates (r,t,p)
X=r.*sin(t).*cos(p); Y=r.*sin(t).*sin(p); 
Z=r.*cos(t);

Contact us at files@mathworks.com