您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > MATLABBesselfunction
MATLAB贝塞尔函数图像及零点1、图像:代码:z=0:0.05:10;ya=besselj(0,z);yb=besselj(1,z);yc=besselj(2,z);yd=besselj(-0.5,z);ye=besselj(0.5,z);plot(z,ya,'r',z,yb,'g',z,yc,'b',z,yd,'m',z,ye,'k')legend('J(0)','J(1)','J(2)','J(-1/2)','J(1/2)');grid2、图像:代码:z=-10:0.05:10;ya=besselj(0,z);yb=besselj(1,z);yc=besselj(2,z);yd=besselj(-0.5,z);ye=besselj(0.5,z);plot(z,ya,'r',z,yb,'g',z,yc,'b',z,yd,'m',z,ye,'k')legend('J(0)','J(1)','J(2)','J(-1/2)','J(1/2)');grid3、零点(分别为0、1、2、3、-1、0.5阶贝塞尔函数在x非负轴的前十个根)代码:j=zeros(6,10);incr=4.0;forv=0:3h=v+1.9*v^(1/3)+1;if(v==0)j(v+1,1)=fzero(@(x)besselj(v,x),2);elsej(v+1,1)=fzero(@(x)besselj(v,x),h);endfors=2:10j(v+1,s)=fzero(@(x)besselj(v,x),j(v+1,s-1)+incr);endendfori=0:4:36s=i/4+1;j(5,s)=fzero(@(x)besselj(-1,x),i);endfori=0:4:36s=i/4+1;j(6,s)=fzero(@(x)besselj(0.5,x),i);endrootBessel=j结果:
本文标题:MATLABBesselfunction
链接地址:https://www.777doc.com/doc-2886960 .html