- verify that all data inputs (GO_agg, VA, T, fd, etc.) are loaded correctly and have the expected dimensions and values.
- ensure that the initial guesses respect any constraints on the parameters. In your code, you've defined lower bounds (lb) as all elements being tol and upper bounds (ub) as all elements being inf. These bounds might need adjustment based on the nature of your problem.
Error using barrier Objective function is undefined at initial point. Fmincon cannot continue.Error in Calibration (line 161) [x, fval ] = fmincon(GGG, x0, A, b, Aeq, beq, lb,
2 views (last 30 days)
Show older comments
Hello,
Please can someone help me solve this issue. I keep getting the below error. Attached also is my matlab codes.
Thanks,
Celestine.
>> Calibration
Error using barrier
Objective function is undefined at initial point. Fmincon cannot continue.
Error in fmincon (line 861)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] =
barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
Error in Calibration (line 161)
[x, fval ] = fmincon(GGG, x0, A, b, Aeq, beq, lb, ub, nonlcon, opts);
0 Comments
Answers (1)
Himanshu
on 5 Jun 2024
Hey Celestine,
I tried running your code and along with the error messages mentoined by you I also encountered some other errors, one of which being
Unrecognized function or variable 'GEsolve'.
This indicates that you have not defined the 'GEsolve' function. This function is critical for your calibration process, as it seems to be used to calculate the sum of squares of some residuals or differences between model predictions and observed data, which 'fmincon' then minimizes. So make sure this function is implemented and in the current MATLAB path.
Once that is done, to debug the remaining errors, you will have to:
Hope this helps!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!