196
15 Orthogonal Polynomials: General Aspects
n = 3;m=2;ms=1;
% basic data, n = l - m
alpha = m-ms;
% ms == m’
beta = m+ms;
theta = linspace(-pi,pi);
% theta = angle beta
jx = cos(theta);
cx = cos(theta/2);
sx = sin(theta/2);
obj = jacobix(alpha,beta,n,jx);% jacobi polynomial
%
intermediate calculations
l = obj.degree+m;
vorf = sqrt(gamma(l+m+1). * gamma(l-m+1)./...
(gamma(l+ms+1). * gamma(l-ms+1)));
cxmms = cx.^(m+ms);
sxmms = sx.^(m-ms);
%%
correct size for multiplication
l = repmat(l,1,length(theta));
vorf = repmat(vorf,1,length(theta));
cxmms = repmat(cxmms,n+1,1);
sxmms = repmat(sxmms,n+1,1);
%%
wigner rotation function
djmms = vorf. * cxmms. * sxmms. * obj.value;
plot(theta,djmms), shg
% visualisation
The SPECFUNPHYS Function Jacobizero
The evaluation of the polynomial roots is based on the computation of the
eigenvalues of the corresponding Jacobi matrix (15.6) with the MATLAB function eig. The syntax of the SPECFUNPHYS function jacobizero is jaz =
jacobizero(alpha, beta, n), with the input variables “alpha”, “beta”
(Jacobi polynomial parameters) scalar floating numbers, and “n” (polynomial
degree), a positive integer value and the output variable “jaz”, the position of the
polynomial roots. An alternative could be again based on the MATLAB function
roots in combination with jacobipoly.
Example
(on the left-hand side the position of the zeros and right-hand side the corresponding function values):
>>jaz=jacobizero(pi,1+i,7) >>obj=jacobix(pi,1+i,7,jaz);
jaz =
>> obj.value(end,:).’
-0.9207 + 0.0485i
1.0e-13 *
-0.0536 - 0.0063i
-0.7337 + 0.0769i
-0.0299 - 0.0172i
-0.4669 + 0.0880i
0.0177 - 0.0331i
-0.1487 + 0.0834i
0.0059 - 0.0117i
0.7743 + 0.0216i
0.3504 + 0.1064i
0.1873 + 0.0671i
0.0167 + 0.0024i
0.5058 + 0.0446i
-0.0591 - 0.0300i
15 Orthogonal Polynomials: General Aspects
n = 3;m=2;ms=1;
% basic data, n = l - m
alpha = m-ms;
% ms == m’
beta = m+ms;
theta = linspace(-pi,pi);
% theta = angle beta
jx = cos(theta);
cx = cos(theta/2);
sx = sin(theta/2);
obj = jacobix(alpha,beta,n,jx);% jacobi polynomial
%
intermediate calculations
l = obj.degree+m;
vorf = sqrt(gamma(l+m+1). * gamma(l-m+1)./...
(gamma(l+ms+1). * gamma(l-ms+1)));
cxmms = cx.^(m+ms);
sxmms = sx.^(m-ms);
%%
correct size for multiplication
l = repmat(l,1,length(theta));
vorf = repmat(vorf,1,length(theta));
cxmms = repmat(cxmms,n+1,1);
sxmms = repmat(sxmms,n+1,1);
%%
wigner rotation function
djmms = vorf. * cxmms. * sxmms. * obj.value;
plot(theta,djmms), shg
% visualisation
The SPECFUNPHYS Function Jacobizero
The evaluation of the polynomial roots is based on the computation of the
eigenvalues of the corresponding Jacobi matrix (15.6) with the MATLAB function eig. The syntax of the SPECFUNPHYS function jacobizero is jaz =
jacobizero(alpha, beta, n), with the input variables “alpha”, “beta”
(Jacobi polynomial parameters) scalar floating numbers, and “n” (polynomial
degree), a positive integer value and the output variable “jaz”, the position of the
polynomial roots. An alternative could be again based on the MATLAB function
roots in combination with jacobipoly.
Example
(on the left-hand side the position of the zeros and right-hand side the corresponding function values):
>>jaz=jacobizero(pi,1+i,7) >>obj=jacobix(pi,1+i,7,jaz);
jaz =
>> obj.value(end,:).’
-0.9207 + 0.0485i
1.0e-13 *
-0.0536 - 0.0063i
-0.7337 + 0.0769i
-0.0299 - 0.0172i
-0.4669 + 0.0880i
0.0177 - 0.0331i
-0.1487 + 0.0834i
0.0059 - 0.0117i
0.7743 + 0.0216i
0.3504 + 0.1064i
0.1873 + 0.0671i
0.0167 + 0.0024i
0.5058 + 0.0446i
-0.0591 - 0.0300i
