Hi there,
How should I write this equation as a constraint?
Many thanks.

댓글 수: 4

Walter Roberson
Walter Roberson 2022년 12월 18일
편집: Walter Roberson 2022년 12월 18일
I think you would have to use nonlinear constraints for that if you are using fmincon directly.
Benj D
Benj D 2022년 12월 18일
Thank you. But then the gradient function for each equation would be a constant. I don't know... it's weird to me.
Walter Roberson
Walter Roberson 2022년 12월 18일
That is not obvious to me? Could you expland on that?
Benj D
Benj D 2022년 12월 18일
I was going to explain, but the question has been answered. Thank you anyway.

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

 채택된 답변

Torsten
Torsten 2022년 12월 18일
편집: Torsten 2022년 12월 18일

1 개 추천

Here are the constraints to be put in Aeq and beq if you use "fmincon".
n = 5;
p = 3;
A = sym('A',[n,p]);
X = sym('X',[n,p]);
eqn = A.'*X + X.'*A == 0;
[Aeq,beq] = equationsToMatrix(eqn(:),X)
Aeq = 
beq = 

추가 답변 (0개)

카테고리

질문:

2022년 12월 18일

댓글:

2022년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by