Changeset 19369
- Timestamp:
- 05/14/15 12:41:19 (10 years ago)
- Location:
- issm/trunk-jpl/src/m/psl
- Files:
-
- 12 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/psl/p_polynomial_value.m
r19341 r19369 104 104 105 105 v = ones ( m, n + 1 ); 106 %v = zeros ( m, n + 1 );107 108 % v(1:m,1) = 1.0;109 106 110 107 if ( n < 1 ) … … 113 110 114 111 v(1:m,2) = x; 115 %v(1:m,2) = x(1:m,1);116 112 117 113 for i = 2 : n 118 114 119 %v(1:m,i+1) = ( ( 2 * i - 1 ) * x(1:m,1) .* v(1:m,i) ...120 % - ( i - 1 ) * v(1:m,i-1) ) ...121 115 v(:,i+1) = ( ( 2 * i - 1 ) * x .* v(:,i) ... 122 - ( i - 1 ) * 116 - ( i - 1 ) * v(:,i-1) ) ... 123 117 / ( i ); 124 118 125 119 end 126 120 127 % return128 %end -
issm/trunk-jpl/src/m/psl/sharmonics.m
r19319 r19369 18 18 lon=lon*pi/180; 19 19 20 disp(['Spherical harmonics of degree and orders up to ',num2str(lMax),' being computed...']);20 %disp(['Spherical harmonics of degree and orders up to ',num2str(lMax),' being computed...']); 21 21 %ortho-normalized SH 22 22 for l=0:lMax 23 plm = legendre(l,cos(lat),'norm'); 23 plm = legendre(l,cos(lat),'norm'); %nromalized Plm (see Matlab documents) 24 24 for m=-l:l 25 if(m<0) 26 sh(:,1+q)=(-1)^(abs(m))*2.*plm(abs(m)+1,:)'.*sin(abs(m).*lon); 27 elseif(m==0) 28 sh(:,1+q)=sqrt(2)*plm(abs(m)+1,:)'; 29 else 30 sh(:,1+q)=(-1)^(abs(m))*2.*plm(abs(m)+1,:)'.*cos(abs(m).*lon); 31 end 25 sh(:,1+q)=(-1)^(abs(m)).*plm(abs(m)+1,:)'.*(cos(abs(m).*lon)*(m>=0)+sin(abs(m).*lon)*(m<0)).*sqrt((2-(m==0))/(2*pi)); %orthonormalized 32 26 q=q+1; 33 27 end 34 28 %disp(['Spherical Harmonics of degree ',num2str(l),' (of ',num2str(lMax),') computed!']); 35 29 end 36 disp(['... done!']);30 %disp(['... done!']); 37 31 38 32 -
issm/trunk-jpl/src/m/psl/shlm.m
r19323 r19369 20 20 for l=0:lMax 21 21 for m=-l:l 22 %func0 = sh(:,1+p).*(func<1); 22 23 func0 = sh(:,1+p).*func; 23 24 sh_lm(1+p) = sum(mean(func0(index),2).*areas); … … 25 26 end 26 27 end 27 sh_lm = sh_lm/sum(areas);28 %sh_lm = sh_lm*4*pi/sum(areas);28 %sh_lm = sh_lm/sum(areas); 29 sh_lm = sh_lm*4*pi/sum(areas); 29 30 31 -
issm/trunk-jpl/src/m/psl/shlm_element.m
r19342 r19369 19 19 for l=0:lMax 20 20 for m=-l:l 21 %func0 = sh(:,1+p).*(func<1);22 21 func0 = sh(:,1+p).*func; 23 22 sh_lm(1+p) = sum(func0.*areas); … … 25 24 end 26 25 end 27 %sh_lm = sh_lm/sum(areas);28 26 sh_lm = sh_lm*4*pi/sum(areas); 29 27
Note:
See TracChangeset
for help on using the changeset viewer.