Matrix inequalities mistaken as element-wise equality

148 views
Skip to first unread message

Pan Zhao

unread,
Jul 21, 2016, 2:53:23 PM7/21/16
to YALMIP
Hi Johan and other Yalmip users,

I tried to solve a SDP problem. However, when I declared a matrix inequalities in the following way:

A = ...
A = A + B
A = A' + A
Consts = [Consts  A<0]

yalmip always mistook the constraint A<0 as a element-wise constraint.  I intentionally make the matrix symmetric, but it did not work this time.  The final A matrix is 12 by 12. Any suggestion is welcome!

Thank you!


Regards
Pan

Johan Löfberg

unread,
Jul 21, 2016, 3:03:08 PM7/21/16
to YALMIP
It must be incredibly badly conditioned data for A+A' to be declared unsymmetric. Supply reproducible code.

Pan Zhao

unread,
Jul 21, 2016, 4:58:20 PM7/21/16
to YALMIP
Hi Johan,

Thanks a lot for your reply. Please find my code for declaring the constraints. 

Regards
Pan
MatIneq.m

Johan Löfberg

unread,
Jul 21, 2016, 5:03:15 PM7/21/16
to YALMIP
You have Nans in your expressions, as you try to put sdpvars in a double (your LMI1 is initially a double), which matlab doesn't support

Pan Zhao

unread,
Jul 21, 2016, 5:21:58 PM7/21/16
to YALMIP

Thank you so much Johan. I just removed the one-line code for initialization of LMI1 as a zero matrix, and the problem solved. 

nazanin soleimani

unread,
Jul 1, 2018, 4:07:26 AM7/1/18
to YALMIP
hi,
I have a problem. same as boran. But I didn't get the answer. I have an matrix inequality which every element is a matrix and some zeros or eyes. and in those matrices every element is a matrix. I gathered them in one matrix but when I use constraint <=0 matlab thinks it's a element-wise inequality. How can I make it understand that it's a matrix inequality?

Johan Löfberg

unread,
Jul 1, 2018, 4:39:37 AM7/1/18
to YALMIP
The matrix you have defined is not symmetric, hence it is not (and cannot be) a matrix inequality
Reply all
Reply to author
Forward
0 new messages