資源簡介
matlab對軌道角動量的仿真,可以更改波長和模態(tài)值以適應光學和電磁應用
代碼片段和文件信息
clear;
%----------------constants-------------------
c=3*10^5;
%?c=3*10^8;%Requested?25132741229x1?(187.3GB)?array?exceeds?maximum?array?size?preference.
%-------------things?to?change---------------
l=1;
lam=1.5;?%Wavelength
A=0.5;?%Amplitude
N=100;?%
t_stop=10;?%Amount?of?timesteps
z_range=abs(l)*lam;?%Length?of?z?values
%--------------------------------------------
k=2*pi/lam;
w=k*c;
fre=1.5*10^9;
%?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;
while?t<=t_stop
????clf;
????hold?on
評論
共有 條評論