CVX Forum: a community-driven support forum
Latest Categories Search
Home / Uncategorized / Diagonal constraint

Diagonal constraint

Uncategorized
Nov 19, 2021
L
Likexin1112
Nov 19, 2021 #1

How to write the constraint “diag(A)=I”? I is the unit matrix and A is a n*n hermite semidefinite matrix.

M
Mark L. Stone
Nov 19, 2021 #2

diag(A) == 1 constrains all diagonal elements of A to 1. diag(A) == ones(n,1) does the same thing. Noe that == rather than = is needed for equality constraint.

1 reply
L
Likexin1112
Nov 19, 2021 #3
Replying to #2

Thank you very much!!!

Archive of CVX Forum: a community-driven support forum — Generated as a static archive