matlab中求函数的最小值m=60; m1=input('please input m1=');a=m1/mo1=0.09 o2=0.03 T=sym('(1-t-o1)*(1-log(t/(t+o2))/log(a))'); t2=1-o1t1=a-o1[tm,TM]=fminbnd(T,t1,t2)报错是? Error using ==> fcnchk If FUN is a MATLAB object, it must have an feva
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 14:52:29
matlab中求函数的最小值m=60; m1=input('please input m1=');a=m1/mo1=0.09 o2=0.03 T=sym('(1-t-o1)*(1-log(t/(t+o2))/log(a))'); t2=1-o1t1=a-o1[tm,TM]=fminbnd(T,t1,t2)报错是? Error using ==> fcnchk If FUN is a MATLAB object, it must have an feva
matlab中求函数的最小值
m=60;
m1=input('please input m1=');
a=m1/m
o1=0.09
o2=0.03
T=sym('(1-t-o1)*(1-log(t/(t+o2))/log(a))');
t2=1-o1
t1=a-o1
[tm,TM]=fminbnd(T,t1,t2)
报错是
? Error using ==> fcnchk
If FUN is a MATLAB object, it must have an feval method.
Error in ==> fminbnd at 148
funfcn = fcnchk(funfcn,length(varargin));
Error in ==> jm at 46
[tm,TM]=fminbnd(T,t1,t2)
matlab中求函数的最小值m=60; m1=input('please input m1=');a=m1/mo1=0.09 o2=0.03 T=sym('(1-t-o1)*(1-log(t/(t+o2))/log(a))'); t2=1-o1t1=a-o1[tm,TM]=fminbnd(T,t1,t2)报错是? Error using ==> fcnchk If FUN is a MATLAB object, it must have an feva
%这样写
m=60;
m1=input('please input m1=');
a=m1/m
o1=0.09
o2=0.03
T=@(t) (1-t-o1).*(1-log(t./(t+o2))./log(a)); %inline函数要这样写!
t2=1-o1
t1=a-o1
[tm,TM]=fminbnd(T,t1,t2)