matlab程序

[复制链接]
1053|2
 楼主| 1212美丽心情 发表于 2015-4-1 20:57 | 显示全部楼层 |阅读模式
clear all;close all;
l=3;  w=3; h=2.5;  %mm
u=4*pi*10^(-7);    %N/A^2
B=1.25;            %T
d=0:1:10;
F=(1.5/(1+3*d))*(w*h/2*u)*((B/pi)*tan.^(-1)*(w*h/2*d*sqrt(w.^2+h.^2+4*d.^2))-tan.^(-1)*(w*h/2*(l+d)*sqrt(w.^2+h.^2+4*(l+d).^2))).^2;
plot(d,F,'b')
求大神指点哪里出错了?
xiaoelectron 发表于 2015-4-1 22:44 | 显示全部楼层
clear all;close all;
l=3;  w=3; h=2.5;  %mm
u=4*pi*10^(-7);    %N/A^2
B=1.25;            %T
d=0:1:10;
F=(1.5/(1+3*d));%*(w*h/2*u)*((B/pi)*tan.^(-1)*(w*h/2*d*sqrt(w.^2+h.^2+4*d.^2))-tan.^(-1)*(w*h/2*(l+d)*sqrt(w.^2+h.^2+4*(l+d).^2))).^2;
plot(d,F)
??? Error using ==> mldivide
Matrix dimensions must agree.

改后
clear all;close all;
l=3;  w=3; h=2.5;  %mm
u=4*pi*10^(-7);    %N/A^2
B=1.25;            %T
d=0:1:10;
F=(1.5./(1+3*d))*(w*h/2*u)*((B/pi)*tan.^(-1)*(w*h/2*d*sqrt(w.^2+h.^2+4*d.^2))-tan.^(-1)*(w*h/2*(l+d)*sqrt(w.^2+h.^2+4*(l+d).^2))).^2;
plot(d,F,'b')
??? Error using ==> tan
Not enough input arguments.

能发下F的原版公式吗
 楼主| 1212美丽心情 发表于 2015-4-2 09:36 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

5

主题

13

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部