資源簡介
matlab仿真軌道角動量,模態值從0到+3,畫出平面波和渦旋波的示意圖
代碼片段和文件信息
clear;
%----------------constants-------------------
c=1;
%-------------things?to?change---------------
l_start=0;?%start?OAM
lam=1.5;?%Wavelength
A=0.5;?%Amplitude
N=100;?%
t_stop=10;?%Amount?of?timesteps
z_range=2*lam;?%Length?of?z?values
%--------------------------------------------
k=2*pi/lam;
w=k*c;
k_vector=[1?0?0]*k;
%---------vector?x--------
z_value=linspace(0z_rangeN);?%z?on?x-axis?in?plot
L_z=length(z_value);
r=A*ones(1N);
%-----?---------?-------
t_steg=lam/(2*2*pi*c);?%Not?to?big?timesteps
t_vector=0:t_steg:t_stop;
%------------------------
z_antal=z_range/lam;
steg=zeros(1z_antal);?%s??att?den?plana?v?gen?upprepas
%d??den?passerar?utanf?r?bild.
t=1;
n=1;
l=l_start;
while?t<=t_stop
????while?l<=l_start+3
????????if?l==0?%Plane?wave
????????????clf;
????????????subplot(22n);
????????????hold?on;
????????????axis([0?z_range?-2?2?-2?2]);
????????????view(5130);
????????????axis?fill;
????????????axis?square;
????????????grid?on;
%
- 上一篇:任意長的整數進行加法運算
- 下一篇:zigbee無線傳感器網絡設計與實現(源代碼)
評論
共有 條評論