use of arrays in variable
2 次查看(过去 30 天)
显示 更早的评论
function y=f(kx)
l=6330*(10)^(-10);
k0=2*pi/l;
nc=1.33;
ec=nc^2;
na=1.43;
ea=na^2;
nf=1.59;
ef=nf^2;
nm=0.064+1i*4;
em=nm^2;
ns=1.495;
es=ns^2;
df=0.5e-6;
dm=0.03e-6;
%da=0.06e-6;
%kx=(2*pi/l)*np*sin(a);
kc=k0*sqrt(x^2-ec);
ka=k0*sqrt(ea-x^2);
kf=k0*sqrt(ef-x^2);
km=k0*sqrt(em-x^2);
ks=k0*sqrt(x^2-es);
rfm=(kf-km)/(kf+km);
rms=(km-ks)/(ks+km);
rfa=(kf-ka)/(kf+ka);
rac=(ka-kc)/(ka+kc);
a=(1-rfm)/(1+rfm);
b=(1-rms*exp(2*1i*dm*km))/(1+rms*exp(2*1i*dm*km));
c=(1-rfa)/(1+rfa);
f=(1-rac*exp(2*1i*da*ka))/(1+rac*exp(2*1i*da*ka));
pfms=2*atan(1i*a*b);
pfac=2*atan(1i*c*f);
y=2*kf*df-pfms-pfac;
end
this is the simple function program we have to calculate the value of df/ddna ie chane in f/change in na vs da
how to use this program
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!