title: Fmincon in matlab running out of memory
body: <p>I am using Matlab's fmincon to optimize an objective function which is the l2 norm between 2 vectors. There is also an inequality constraint which is another l2 norm between the vector to be optimized and some other constance vector. So basically the number of parameters is the size of this vector which I am trying to minimize in an l2 sense.</p>
  
  <p>|| M*s - s ||_2 s.t. ||s-t||_2 &lt; epsilon</p>
  
  <p>M is a constant matrix, t is a constant vectors and epsilon is a constant. </p>
  
  <p>So now the problem for me is that s is huge. It can have from anywhere 400 to 20000 variables. Now fmincon runs out of memory when internally trying to store matrices. Is there a way to solve this problem ? </p>
  
  <p>Thanks !</p>