% bessel展開公式為:
lz,theta為實數,n為整數的情況
step=1;
theta=pi/4;
n=-30:step:30;
z=2;
y1=exp(1i*z。*cos(theta));
y2=0;
for m=n(1):step:n(end)
y2= y2 + (1i)。^m。*besselj(m,z)。*exp(1i*m*theta);
end
plot( abs(y1)。^2,‘o’,‘Markersize’,50);
hold on
plot(abs(y2)。^2,‘o’,‘Markersize’,30);
hold off
lz,theta為實數,n為小數的情況
step=0。3;theta=pi/4;n=-30:step:30;z=2;
y1=exp(1i*z。*cos(theta));
y2=0;
for m=n(1):step:n(end)
y2= y2 + (1i)。^m。*besselj(m,z)。*exp(1i*m*theta);
end
plot( abs(y1)。^2,‘o’,‘Markersize’,50);
hold on
plot(abs(y2)。^2,‘o’,‘Markersize’,30);
hold off
lz為複數,theta為實數,n為小數的情況
step=0。3;theta=pi/4;n=-50:step:50;z=2+3*1i;
y1=exp(1i*z。*cos(theta));
y2=0;
for m=n(1):step:n(end)
y2= y2 + (1i)。^m。*besselj(m,z)。*exp(1i*m*theta);
end
plot( abs(y1)。^2,‘o’,‘Markersize’,50);
hold on
plot(abs(y2)。^2,‘o’,‘Markersize’,30);
hold off
lz為複數,theta為實數,n為整數的情況
step=0。3;theta=pi/4;n=-50:step:50;z=2+3*1i;
y1=exp(1i*z。*cos(theta));
y2=0;
for m=n(1):step:n(end)
y2= y2 + (1i)。^m。*besselj(m,z)。*exp(1i*m*theta);
end
plot( abs(y1)。^2,‘o’,‘Markersize’,50);
hold on
plot(abs(y2)。^2,‘o’,‘Markersize’,30);
hold off
lz為實數,theta為複數,n為小數的情況
step=0。3;theta=pi/4+3*1i;n=-30:step:30;z=2;
y1=exp(1i*z。*cos(theta));
y2=0;
for m=n(1):step:n(end)
y2= y2 + (1i)。^m。*besselj(m,z)。*exp(1i*m*theta);
end
plot( abs(y1)。^2,‘o’,‘Markersize’,50);
hold on
plot(abs(y2)。^2,‘o’,‘Markersize’,30);
hold off
結果是,公式中,n為整數,其它為實數時,公式成立
Published with MATLAB R2020a