Code covered by the BSD License
-
SHCreateVec(lmax)
-
SHCreateYVec(lmax,lon,colat,u...
-
SHDecompose(vec,lmax)
-
SHInfo2Vec(lmcosi)
-
SHInfo2Vec(lmcosi)
-
SHMapToGrid(vec,res,lmax,loca...
-
SHMatrix(vec,lmax)
-
SHMatrix2Vec(A,B)
-
SHPlotProj(vec,res,interp)
-
SHSetValue(invec,value,l,m,N,...
-
SHVec2Info(vec)
lmcosi = SHVec2Info(vec)
-
SHVec2Info(vec)
lmcosi = SHVec2Info(vec)
-
SHVec2Matrix(vec)
-
SHVec2l(vec)
-
SHl2n(l)
-
SHlm2n(l,m)
-
SHn2lm(n)
-
rotvec=SHRotateVec(vec,alp,bt...
rotvec=SHRotateVec(vec,alp,bta,gam)
-
shdemo.m
-
View all files
from
SHtools - Spherical Harmonics Toolbox
by Anna Kelbert
Toolbox for manipulating and plotting vectors of spherical harmonic coefficients
|
| SHVec2Info(vec)
|
function lmcosi = SHVec2Info(vec)
% lmcosi = SHVec2Info(vec)
%
% Converts the real spherical harmonic coefficient vector to two
% coefficient matrices, A and B, such that A contains coefficients
% by cos(m*phi) and B contains coefficients by sin(m*phi).
% Proceeds to convert A and B to a single coefficient structure
% lmcosi in the format [l m Ccos Csin] in order, m>=0.
% This format is required by plm2rot and other functions
% of the library DOTM by F. J. Simons
[A,B]= SHVec2Matrix(vec);
lmax = size(A,1)-1;
count = 0;
for l=0:lmax
for m=0:l
count = count+1;
end
end
lmcosi(1:count,1:4) = 0;
j=0;
for l=0:lmax
for m=0:l
j=j+1;
lmcosi(j,1)=l;
lmcosi(j,2)=m;
lmcosi(j,3)=A(l+1,m+1);
lmcosi(j,4)=B(l+1,m+1);
end
end
|
|
Contact us at files@mathworks.com