求助大侠:非线性方程组求解出现问题。
M文件 如下:function x=mzzzfun1
format long
x0 = ;
options=optimset('MaxFunEvals',330,'MaxIter',7000);
= 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
= fsolve(@f,x0,options) ;
回复 1 # 东南小忽悠 的帖子
Ref 4F, 常见的程序出错问题整理 http://forum.vibunion.com/thread-46001-1-1.html
(from http://forum.vibunion.com/home-space-uid-63979-do-blog-id-18250.html)
页:
[1]