title: YALMIP outputs "Infeasible" for an easy, feasible SDP
body: <p>I want to determine whether a given 3x3 matrix is positive-semidefinite or not. To do so, I write the following SDP in YALMIP</p>
  
  <pre><code>v=0.2;
  a=sdpvar(1);
  b=sdpvar(1);
  M=[1 a -v/4 ; b 1 0 ; -v/4 0 0.25];
  x=sdpvar(1);
  optimize([M+x*eye(3)&gt;=0],x,sdpsettings('solver','sedumi'))
  </code></pre>
  
  <p>This program gives me the error "Dual infeasible, primal improving direction found". This happens for any value of v in the interval (0,1].</p>
  
  <p>Given that this problem is tractable, I diagonalized the matrix directly obtaining that the three eigenvalues are the three roots of the following polynomial</p>
  
  <pre><code>16*t^3 - 36*t^2 + (24 - 16*a*b - v^2)*t + (-4 + 4*a*b + v^2)
  </code></pre>
  
  <p>Computing the values of the three roots numerically I see that the three of them are positive for sign(a)=sign(b) (except for a small region in the neighborhood of a,b=+-1), for any value of v. Therefore, the SDP should run without problems and output a negative value of x without further complications.</p>
  
  <p>To make things more interesting, I ran the same code with the following matrix</p>
  
  <pre><code>M=[1 a v/4 ; b 1 0 ; v/4 0 0.25];
  </code></pre>
  
  <p>This matrix has the same eigenvalues as the previous one, and in this case the program runs without any issues, confirming that the matrix is indeed positive-semidefinite.</p>
  
  <p>I am really curious about the nature of this issue, any help would be really appreciated.</p>
  
  <p>EDIT: I also tried the SDPT3 solver, and results are very similar. In fact, the program runs smoothly for the case of +v, but when i put a minus sign I get the following error</p>
  
  <pre><code>'Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using  &amp; …'
  </code></pre>
  
  <p>Furthermore, when I add some restrictions to the variables, i.e., I run the following command</p>
  
  <pre><code>optimize([total+w*eye(3)&gt;=0,-1&lt;=a&lt;=1,-1&lt;=b&lt;=1],w,sdpsettings('solver','sdpt3'))
  </code></pre>
  
  <p>Then the error turns to an 'Infeasible problem' error.</p>