Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2013-04-08
年龄: 31
帖子: 2
声望力: 0 ![]() |
![]()
R=0.45;
u0=4.*pi.*10.^(-7); I=100; z0=0.23; x=0;y=0;z=-0.4:0.05:0.4; b=(u0.*R.*I)./(4.*pi); F1=@(t)((R-y.*sin(t)-x.*cos(t))./((x-R.*cos(t)).^2+(y-R.*sin(t)).^2+(z-z0).^2).^(3./2)); f1=quadl(F1,0,2.*pi); F2=@(t)((R-y.*sin(t)-x.*cos(t))./((x-R.*cos(t)).^2+(y-R.*sin(t)).^2+(z+z0).^2).^(3./2)); f2=quadl(F2,0,2.*pi); B=b.*f1+b.*f2; plot(z,B) 为什么会出现这样的错误? ??? Error using ==> plus Matrix dimensions must agree. Error in ==> Untitled4>@(t)((R-y.*sin(t)-x.*cos(t))./((x-R.*cos(t)).^2+(y-R.*sin(t)).^2+(z-z0).^2).^(3./2)) at 7 F1=@(t)((R-y.*sin(t)-x.*cos(t))./((x-R.*cos(t)).^2+(y-R.*sin(t)).^2+(z-z0).^2).^(3./2)); Error in ==> quadl at 64 y = feval(f,x,varargin{:}); y = y( ![]() Error in ==> Untitled4 at 8 f1=quadl(F1,0,2.*pi); |
![]() |
![]() |