필터 지우기
필터 지우기

How can I troubleshoot this fmincon error?

조회 수: 6 (최근 30일)
Richárd Tóth
Richárd Tóth 2019년 8월 13일
댓글: Richárd Tóth 2019년 8월 13일
Hello
I'm using the fmincon function to solve an optimization problem, but after the 2nd iteration(the first 2 runs fine), it gives me the following error:
Matrix dimensions must agree.
Error in finitedifferences
Error in computeFinDiffGradAndJac
Error in barrier
Error in fmincon (line 813)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
Error in ellipsoidOptimization (line 40)
[d,fval] = fmincon(volumefun, d0, [], [], [], [], lb , ub, nlcon)
I have no idea what to check.
  댓글 수: 4
Torsten
Torsten 2019년 8월 13일
If you don't call fmincon anew for each iteration, c and ceq must have constant size.
Richárd Tóth
Richárd Tóth 2019년 8월 13일
Okay I think that's the problem, I'll try to solve it, thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by