最近在用matlab做相干合成的数值模拟,在画图的时候遇到些问题,不知哪位高手能指点一下,多谢~ w(*vj
N
,'GN[s
这个程序是计算远场光场中主瓣的能量,然后将主瓣能量和f的值画成散点图,最后画图步骤总是报错. axv>6k
clear; 8`q:Gz=M\
lam=500e-9;N1=4;N2=4; Cx(>RXVoJ,
a=2e-4;z=5; $<dH?%!7
k=2*3.14/lam;omega=0.00025; Z58X5"
xm=0.4*lam*z/a;ym=0.4*lam*z/a; 67JA=,EE
n=5; fnjPSts0
syms thetax; IXMop7~
d=linspace(0,1,n); u<7/0;D#+
for i=1:n *KZYv=s,u
B1(i,:)=(sin(0.5*N1*k*d(i)*thetax)./sin(k*0.5*d(i)*thetax)).^2 ..., ?yrX)3hyH
*exp(-0.5*k.^2*omega.^2*thetax.^2); a?I=
!js
I(i,:)=int(B1(i,:),thetax,-lam/(N1*d(i)),lam/(N1*d(i))); 75cW_t,g
Br1=I/16; Uu10)/.LC
f(i,:)=2*omega/d(i); \+oQd=K@
vpa(Br1,5) EA@.,7F
end ?Ny9'g>?
plotmatrix(f,Br1)