title: How do I square a norm in CVX?
body: <p>In the CVX package for Matlab, I want to minimize a function like $|Ax-b|_2^2$ . Meaning the square of a 2-norm. How do I code that in CVX? I tried both:</p>
  
  <pre><code>minimize (norm(A*x-b,2)^2);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>minimize (norm(A*x-b,2)*norm(A*x-b,2));
  </code></pre>
  
  <p>but both threw errors. Is there a builtin function I'm supposed to be using?</p>
  
  <p>(Note, really I'm trying to minimize the sum of that norm squared plus another norm like <code>minimize (norm(A*x-b,2)^2 + norm(x,1));</code> so that's why I'm trying to specify the norm squared and not just be satisfied with finding the minimum of the norm unsquared.)</p>