clear;
az=-pi:pi/50:pi;
el=(-pi/2:pi/50:pi/2)';
x=cos(el)*cos(az);
y=cos(el)*sin(az);
z=sin(el)*ones(size(az));
contour3(x,y,z,20);
axis('equal');
view(3);
