Home > eeg > egis > spline > sphharm.m

sphharm

PURPOSE ^

sh = sphharm(x,y,z,n,m);

SYNOPSIS ^

function sh = sphharm(x,y,z,n,m);

DESCRIPTION ^

sh = sphharm(x,y,z,n,m);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function sh = sphharm(x,y,z,n,m);
0002 %sh = sphharm(x,y,z,n,m);
0003 [az,el,r] = cart2sph(x,y,z);
0004 el = (pi/2)*ones(size(el,1),size(el,2)) - el;
0005 
0006 for i = 1:size(el,1)
0007     ass = legendre(n,cos(el(i,:)));
0008     if m >= 0
0009     sh(i,:) = ass(m+1,:).*cos(m*(az(i,:)));
0010     else
0011     sh(i,:) = -ass(abs(m)+1,:).*sin(m*(az(i,:)));
0012     end;
0013 end;

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003