pan class="comment">% Analytical solution</span>
fprintf(1,<span class="string">'Computing the analytical solution for the case where a^T*x0 &lt;=b...'</span>);
pc_x0 = x0;
fprintf(1,<span class="string">'Done! \n'</span>);
fprintf(1,<span class="string">'Computing the analytical solution for the case where a^T*x0 &gt; b...'</span>);
pc_x1 = x1 + (b - a'*x1)*a/norm(a)^2;
fprintf(1,<span class="string">'Done! \n'</span>);

<span class="comment">% Solution via QP</span>
fprintf(1,<span class="string">'Computi