马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
M文件 如下:
function x=mzzzfun1
format long
x0 = [0;5;0.3;4000];
options=optimset('MaxFunEvals',330,'MaxIter',7000);
[x,fval] = fsolve(@f,x0,options) ;
function F=f(x)
k=3000
ga=10322.87553
ei=178892900.6
p=60000
c=0
h=173
ae=0
ea=95600000
a=0.0478
F =[k*x(2)-ea*(((h-ae-x(2))^2+(x(1))^2)^0.5-h)*cos(x(3))/h;
x(1)-(h-ae-x(2))*tan(x(3));
x(4)*(1-cos(a*h)-c*h)/p+(p*(c-k*x(2)*tan(x(3)))+ga*c)*sin(a*h)/(ga*a*p)-x(1);
(ga+p)*f*cos(a*h)/ga/a/p+(k*x(2)*tan(x(3))*(1-cos(a*h))*p-(ga+p)*f+a*ga*x(4)*sin(a*h))/(ga+p)/p]
end
end
运行出现一些错误,(原先能运行的,把五元方程改为四元反而不行了,其他语句都一样),哪位高手帮忙检查一下,谢谢啦!
Input argument "x" is undefined.
Error in ==> mzzzfun1>f at 16
F =[k*x(2)-ea*(((h-ae-x(2))^2+(x(1))^2)^0.5-h)*cos(x(3))/h;
Error in ==> mzzzfun1>f at 16
F =[k*x(2)-ea*(((h-ae-x(2))^2+(x(1))^2)^0.5-h)*cos(x(3))/h;
Error in ==> fsolve at 180
fuser = feval(funfcn{3},x,varargin{:});
Error in ==> mzzzfun1 at 5
[x,fval] = fsolve(@f,x0,options) ;
|