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 = 

1 件のコメント

Benj D
Benj D 2022 年 12 月 18 日
Thank you, Torsten. That was genius.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSystems of Nonlinear Equations についてさらに検索

質問済み:

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