YALMIP is returning that a program is infeasible

42 views
Skip to first unread message

Hann

unread,
Feb 11, 2018, 2:18:41 PM2/11/18
to YALMIP

I'm having a problem trying to use YALMIP (https://yalmip.github.io/?n=Main.HomePage); I want to solve an LMI with Yalmip Here's the code:

x1 = sdpvar(1, 1) 
x2 = sdpvar(1, 1)
L= lmi(-[1-x1 x1+x2 x1; x1+x2 2-x2 0; x1 0 1+x2])
Z= solvesdp(L,[ ])

but it returns :

   info: 'Infeasible problem (SeDuMi-1.3)'
      problem: 1

why and how can I solve this problem?

and another question: when I used plot(L) it only shows the final answer, how can I plot all principal minors of it?

Johan Löfberg

unread,
Feb 12, 2018, 1:24:58 AM2/12/18
to YALMIP
Well, it is infeasible, so there is not much to do. Neither can you solve it, nor can you plot the feasible set as it is empty

You are using a syntax which is very obsolete
https://yalmip.github.io/tutorial/basics/

I suspect you've switched the sign, since with reversed sign it is feasible
L = [1-x1 x1+x2 x1; x1+x2 2-x2 0; x1 0 1+x2] >= 0
plot(L)
optimize(L)
value([x1 x2])

Hann

unread,
Feb 12, 2018, 10:40:35 AM2/12/18
to YALMIP
Thank you so Much, Johan 

 I have another question, how can I Plot Principle minors of L?

Johan Löfberg

unread,
Feb 12, 2018, 11:11:39 AM2/12/18
to YALMIP
The priniple minors are functions. YALMIP does not plot functions, but plots feasible sets. If you want to plot polynomial functions, you will have to use tools such as ezplot etc
Reply all
Reply to author
Forward
0 new messages