ERROR for the Inverse operation of the "sdpvar" variable

82 views
Skip to first unread message

Rong Zhao

unread,
Mar 26, 2020, 6:16:04 AM3/26/20
to YALMIP
I want to apply the inverse operation for a variable "G2", but there's an error


Undefined function 'inv' for input arguments of type 'sdpvar'.

Error in willdo (line 221)
CF=inv(G2)*barCF;


So I wonder how to conduct inverse operation for variables of the type 'sdpvar'? OR the error didn't happen for this reason? Thanks for yr help!

error.png


Johan Löfberg

unread,
Mar 26, 2020, 6:22:05 AM3/26/20
to YALMIP
You cannot. You either have to be clever and re-parameterize your model so it is expressed in terms of that inverse instead completely, and thus use that as the decision variable

The only way to use an inverse inv(X) is to introduce a new variable Y and add the constraint X*Y == eye(n), which of course leads to a horrible nonconvex bilinear model
Reply all
Reply to author
Forward
0 new messages