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,names]=sphr
function [X,names]=sphr
% [X,names]=sphr defines spherical coordinates
syms r t p real; names=[r t p]; 
X=[r*sin(t)*cos(p);r*sin(t)*sin(p);r*cos(t)];

Contact us at files@mathworks.com