s(size(theta));
v = spherharm(7,0,theta,phi);
plot(theta,v);
</pre>

<p>
Plot a real-values spherical harmonic as a color map over the unit sphere:
</p>

<pre class="matlab">
L = 4;
M = 2;
[x,y,z] = sphere(100);
[phi,theta] = vec2ang(x,y,z);
Y = spherharm(L,M,theta,phi,'r');
surf(x,y,z,Y);
axis equal tight
shading interp
</pre>

<!-- ============================================================= -->
<div class="subtitle">Algorithm</div>

<p>
<code>spherharm</code> computes the complex-valued spherical harmon