主函數(shù):x0=[0.1 0.05 3.5];lb=[0 0 3];ub=[0.8 0.6 10];a=[-1 1 0;-1 0 0;0 -1 0;0 0 -1];b=[0 0 0 -3]';options=optimset('tolcon',1e-8);[x,fval]=fmincon(@cdz_f,x0,a,b,[],[],lb,ub,@cdz_v,options)輔助函數(shù)(非線性約束)function[c,ceq]=cdz_y(x);c(1)=154.34*x(1)/(x(1)^4-x(2)^4)-((x(1)-x(2))/x(1))^(3/2);ceq=[];主函數(shù)(目標函數(shù))略出現(xiàn)以下問題:Warning: Trust-region-reflective method does not currently solve this type of problem,using active-set (line search) instead. > In fmincon at 439In chuandongzhou at 7??? Error using ==> fevalUndefined function or method 'cdz_v' for input arguments of type 'double'.Error in ==> fmincon at 599[ctmp,ceqtmp] = feval(confcn{3},X,varargin{:});Error in ==> chuandongzhou at 7[x,fval]=fmincon(@cdz_f,x0,a,b,[],[],lb,ub,@cdz_v,options)Caused by:Failure in initial user-supplied nonlinear constraint function evaluation. FMINCONcannot continue.
麻煩幫忙看看怎么解決,出現(xiàn)了以下問題:
拉丁的傳說
2023-04-26 21:17:20