最近在用matlab做相干合成的数值模拟,在画图的时候遇到些问题,不知哪位高手能指点一下,多谢~ [b++bCH3
?2<)
Jw
这个程序是计算远场光场中主瓣的能量,然后将主瓣能量和f的值画成散点图,最后画图步骤总是报错. @;/Pl>$|'G
clear; 51k}LH
lam=500e-9;N1=4;N2=4; *qpu!z2m||
a=2e-4;z=5; Cj0r2^`
k=2*3.14/lam;omega=0.00025; t#NPbLZ
xm=0.4*lam*z/a;ym=0.4*lam*z/a; R]"Zv'M(AM
n=5; z$1RD)TQB
syms thetax; ,?GwA@~$k:
d=linspace(0,1,n); [DaAvN^0A
for i=1:n fCY|iO0.t
B1(i,:)=(sin(0.5*N1*k*d(i)*thetax)./sin(k*0.5*d(i)*thetax)).^2 ..., s%jBIeh
*exp(-0.5*k.^2*omega.^2*thetax.^2); !1$x4 qxS
I(i,:)=int(B1(i,:),thetax,-lam/(N1*d(i)),lam/(N1*d(i))); B"4 3o7C
Br1=I/16; 8SjCU+V
f(i,:)=2*omega/d(i); V;SfW2`)
vpa(Br1,5) +Br<;sW
end ,HjJ jpE
plotmatrix(f,Br1)