Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fmincon + interior point algorithm + memory problems
Date: Tue, 4 Dec 2012 14:33:07 +0000 (UTC)
Organization: Xoran Technologies
Lines: 9
Message-ID: <k9l1j3$53o$1@newscl01ah.mathworks.com>
References: <k9ku6c$l3j$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1354631587 5240 172.30.248.47 (4 Dec 2012 14:33:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 4 Dec 2012 14:33:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:784144

"Saad" wrote in message <k9ku6c$l3j$1@newscl01ah.mathworks.com>...
>          
>             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);
================       

 You could use H=speye(n) instead of H=eye(n). Also, lsqnonneg or quadprog might be more efficient than fmincon.