|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
- clear all
- syms s1 s2 zz lamda bata c a w;%variance and parameter
- z=50:300;
- k=2*pi/lamda;
- rho=(0.545*c^2*k^2*zz)^(3/5);
- f1=k^2/(zz^2)*s1*s2;
- f2=exp(j*k/(2*zz)*(s1^2-s2^2))*exp(-1/rho^2*(s1^2+s2^2))*besseli(0,2*s1*s2/rho^2);
- f3=besselj(0,bata*s1)*besselj(0,bata*s2);
- f4=exp(-(s1-a)^2/w^2)*exp(-(s2-a)^2/w^2);
- f=f1*f2*f3*f4;%integrand
- f=subs(f,{lamda,bata,c,a,w},{1550*10^-9,300,10^-14,0.03,0.03});
- fstr=char(vectorize(inline(f)));% character string
- fstr=sprintf('dblquad(inline(%s),0.03,1,0.03,1)',fstr);
- fun=inline(fstr,'s1','s2','zz');
- Z=arrayfun(@(zz)fun,z);
- plot(z,abs(Z))
复制代码
- 下面是出现的问题:
- ??? Error using ==> arrayfun
- inline type is not currently implemented.
- Error in ==> axialintensity at 16
- Z=arrayfun(@(zz)fun,z);
复制代码 恳请指教,谢谢!
[ 本帖最后由 sigma665 于 2008-9-23 10:54 编辑 ] |
|