Matrix equation as constraint

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

4 Comments

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

Sign in to comment.

 Accepted Answer

Torsten
Torsten on 18 Dec 2022
Edited: Torsten on 18 Dec 2022
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 = 

More Answers (0)

Asked:

on 18 Dec 2022

Commented:

on 18 Dec 2022

Community Treasure Hunt

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

Start Hunting!