马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
第一次用fmin,简化函数及错误提示如下,看不出问题出在哪里,请各位帮忙
fua =
(500*x(3)*x(2)^2-107/10)^2+(25/2*x(2)-9)^2+(1000/89*x(1)-824/89)^2
>> x0
x0 =
0.8240 0.7200 0.0413
>> fminunc(fua,x0)
??? Error using ==> optimfcnchk
If FUN is a MATLAB object, it must have an feval method.
Error in ==> fminunc at 192
funfcn = optimfcnchk(FUN,'fminunc',length(varargin),funValCheck,gradflag,hessflag);
>> fminsearch(fua,x0)
??? Error using ==> fcnchk
If FUN is a MATLAB object, it must have an feval method.
Error in ==> fminsearch at 178
funfcn = fcnchk(funfcn,length(varargin)); |