フィルターのクリア

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,

1 回表示 (過去 30 日間)
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);

回答 (1 件)

Himanshu
Himanshu 2024 年 6 月 5 日
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:
  • 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.
Hope this helps!

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by