![]() |
[求助]新手问题
计算f(x)=sinx+3的最小值
编写程序 function f=myfun(x); syms x; f=sin(x)+3; 之后运行 x0=2; %以x0为初始点 [x,fval]=fminsearch(@myfun,x0) 运行却提示出错: [COLOR="Red"]??? Conversion to double from sym is not possible. Error in ==> D:\MATLAB6p5\toolbox\matlab\funfun\fminsearch.m On line 125 ==> fv(:,1) = feval(funfcn,x,varargin{:}); [/COLOR] 刚学matlab,还很不熟悉,望高手指教! |
所有时间均为北京时间。现在的时间是 13:01。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.