I 'll be working on the nonlinear program with fmincon as follows:
>> load('JIRIOT_base.mat')>> options = optimoptions('fmincon','Display','iter','Algorithm','interior-point');>> [x,fval,exitflag,output,lambda] =fmincon(@(x)mindistance(x,xo),xo,A,b,Aeq,beq,lb,[],[],options)Then, error messages occurred as follows:error: barrier (line 22)Caused by:Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.error:fmincon (line 905)[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq, l,u,confcn,options.HessFcn, ...my objective function code is as follows:>>function y = mindistance(x,xo) % objective function
>>y = sum(abs(xo(1:14386,1)).*(x(1:14386,1)./xo(1:14386,1)).*(log(x(1:14386,1)./xo(1:14386,1))-1)+1);
I guess there are many zeros in 'JIRIOT_base.mat'file. I attached the matfile, so please tell me how to solve my program.
Best Answer