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

4 Kommentare

Walter Roberson
Walter Roberson am 18 Dez. 2022
Bearbeitet: Walter Roberson am 18 Dez. 2022
I think you would have to use nonlinear constraints for that if you are using fmincon directly.
Benj D
Benj D am 18 Dez. 2022
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 am 18 Dez. 2022
That is not obvious to me? Could you expland on that?
Benj D
Benj D am 18 Dez. 2022
I was going to explain, but the question has been answered. Thank you anyway.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Torsten
Torsten am 18 Dez. 2022
Bearbeitet: Torsten am 18 Dez. 2022

1 Stimme

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 = 

Weitere Antworten (0)

Gefragt:

am 18 Dez. 2022

Kommentiert:

am 18 Dez. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by