%% Spherical to Cartesian Coordinates
% Convert the spherical coordinates defined by corresponding entries in the matrices az, el, and r to Cartesian coordinates x, y, and z. These points correspond to the eight vertices of a cube.

az = [0.7854 0.7854 -0.7854 -0.7854; 2.3562 2.3562 -2.3562 -2.3562]

%

el = [0.6155 -0.6155 0.6155 -0.6155; 0.6155 -0.6155 0.6155 -0.6155]

%

r = 1.7321*ones(2,4)

%

[x,y,z] = sph2cart(az,el,r)

% Copyright 2012 The MathWorks, Inc.