function [x,y,z] = sph2cart(az,elev,r)
%SPH2CART Transform spherical coordinates to Cartesian.
%	[X,Y,Z] = SPH2CART(AZ,EL,R) transforms data stored in spherical
%	coordinates to Cartesian coordinates. If [M,N] = SIZE(AZ), then
%	EL and R must be also be the same size. AZ and EL must be in radians.
%
%	See also CART2SPH, CART2POL, POL2CART.

%	L. Shure, 4-20-92.
%	Copyright (c) 1984-93 by The MathWorks, Inc.

z = r .* sin(elev);
x = r .* cos(elev) .* cos(az);
y = r .* cos(elev) .* sin(az);
