Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: fmincon + interior point algorithm + memory problems
Replies: 9   Last Post: Dec 5, 2012 1:00 PM

 Messages: [ Previous | Next ]
 Alan Weiss Posts: 1,430 Registered: 11/27/08
Re: fmincon + interior point algorithm + memory problems
Posted: Dec 4, 2012 8:49 AM

On 12/4/2012 8:35 AM, Saad wrote:
> Dear All,
> I keep receiving this error message when implementing an optimization
> with fmincon (interior point algorithm). I seems that it is a memory
> problem, any clue of how to fix this one please?
>
> ??? Error using ==> ldl
> Out of memory. Type HELP MEMORY for your options.
>
> Here is my code:
>
> beq = [ 1 const1 const2]' ;
> months={'Jan', 'Feb', ...,'Dec'};
> for i=1997
>
> for j=1:length(months)
> a = [a1, a2];
> n = size(a,1) ; Aeq =
> vertcat(ones(1,n),a') ; lb = zeros(n,1) ; H =
> eye(n) ; [w,fval, exitflag] =
> fmincon(@(x)norm(H*x-w0)^2,w0,[],[],Aeq,beq,lb,[],[],options);
> end
> end
>
> Any guidance or advice is much appreciated. Regards
>

It is possible that you need to use a memory-saving Hessian. Try setting
the option Hessian to 'lbfgs'. See
http://www.mathworks.com/help/optim/ug/fmincon.html#f186882

Alan Weiss
MATLAB mathematical toolbox documentation

Date Subject Author