lsqlin error msg --"out of memory"

  • Permalink
  • submit to reddit
  • Email
  • Follow


I was doing a simple linear least square fit using lsqlin with constraints:
min||Ax-(b-c)|| with -Ax<=c, A is a m*n sparse matrix. m = 65536 and n = 83.
x , c are vectors with length 83 and 65536 respectively. 
>> x=lsqlin(A,b-c,-A,c);
Matlab msg:

??? Error using ==> vertcat
Out of memory. Type HELP MEMORY for your options.

Error in ==> lsqlin at 216
if isempty([Aeq;A]) && isempty([beq;b]) && all(isinf([lb;ub]))

Is this problem too large for Matlab to handle? It seems hard to imagine it will run out of memory.
0
Reply iloveyu 9/3/2010 12:10:05 AM

See related articles to this posting


On 9/2/2010 8:10 PM, iloveyu wang wrote:
> I was doing a simple linear least square fit using lsqlin with constraints:
> min||Ax-(b-c)|| with -Ax<=c, A is a m*n sparse matrix. m = 65536 and n =
> 83.
> x , c are vectors with length 83 and 65536 respectively.
>>> x=lsqlin(A,b-c,-A,c);
> Matlab msg:
>
> ??? Error using ==> vertcat
> Out of memory. Type HELP MEMORY for your options.
>
> Error in ==> lsqlin at 216
> if isempty([Aeq;A]) && isempty([beq;b]) && all(isinf([lb;ub]))
>
> Is this problem too large for Matlab to handle? It seems hard to imagine
> it will run out of memory.

The function reference pages for LSQLIN state:
"The large-scale algorithm requires only upper and lower bounds, meaning 
no linear inequalities or equalities. Otherwise, lsqlin uses the 
medium-scale algorithm."

The pages that describe what medium-scale means say:
"Large-Scale vs. Medium-Scale Algorithms.  An optimization algorithm is 
large scale when it uses linear algebra that does not need to store, nor 
operate on, full matrices. This may be done internally by storing sparse 
matrices, and by using sparse linear algebra for computations whenever 
possible....In contrast, medium-scale methods internally create full 
matrices and use dense linear algebra."
See
http://www.mathworks.com/help/toolbox/optim/ug/f12471.html#brppuoz

So I am sorry, but for your problem (with inequalities), LSQLIN uses 
dense linear algebra, not sparse.

You could try using one of the sparse solvers on your problem, ones that 
might be less efficient, but could handle the problem using sparse 
linear algebra. Perhaps fmincon interior-point would work for you. Or 
perhaps you can reformulate your problem to work with the large-scale 
lsqlin solver.

Alan Weiss
MATLAB mathematical toolbox documentation
0
Reply Alan 9/3/2010 2:50:33 PM

You can try a few options in TOMLAB, for example TLSQR, LSSOL and
SNOPT.

Best wishes, Marcus
Tomlab Optimization Inc.
http://tomopt.com/
http://tomsym.com/

> Is this problem too large for Matlab to handle? It seems hard to imagine it will run out of memory.

0
Reply Marcus 9/4/2010 1:23:30 AM
comp.soft-sys.matlab 203404 articles. 529 followers. Post

2 Replies
237 Views

Similar Articles

[PageSpeed] 46


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

NLMIXED
Hi, Ver 8.02, XP, I try to fit a random effects model for some multinomial (ordinal) data. I use NLMIXED and have coded the response categories similarly to Hartzel et al "Multinomial Logit Random Effects Models", SMIJ 2001, Vol 1,2. Here is the output of a few data lines: Obs length setid freq y1 y2 y3 y4 y5 1 13.5 1 1 1 0 0 0 0 2 15.5 1 1 1 0 0 0 0 3 17.5 1 5 1 0 0 0 0 4 17.5 1 1 0 1 0 0 0 5 18.5 1 5 1 0 0 0 0 6 18.5 1 1 0 1 0 0 0 7 18.5 1 1 0 0 1 0 0 8 18.5 1 1 0 0 0 1 0 9 19.5 1 3 1 0 0 0 0 10 19.5 1 2 0 1 0 0 0 11 20.5 1 3 1 0 0 0 0 And the proc code proc nlmixed data=a ME...

Error msg on IF Then
Can someone tell me what is wrong with this IF-THEN block if cext&date = 'B' then status ='BAD'; else if cext&date = 'Z' then do; if nrea&date = 89 then status ='BKRP'; else if nrea&date = 10 then status ='DELE'; else if nrea&date = 88 then status ='DELE'; end; else status='BAD '; else status='GOOD'; Try looking at else status='BAD '; else status='GOOD'; remove one and I bet it works. HTH Toby Dunn -----Original Message...

error msg
Hello I tried to compile gpc with gcc with the version that you wrote. gcc-3.2.1 and gpc-20030507. Get the same error like above. The last make message is : /usr/home/name/temp/gcc-3.2.1/gcc -I/usr/home/name/temp/gcc-3.2.1/gcc/p -I/usr/home/name/temp/gcc-3.2.1/gcc/ config -I /usr/home/name/temp/gcc-3.2.1/gcc/.../include/ -DGPC gcc: No input files specified Error code 1 *** But I have chanched first the plural.y file in /usr/home/name/temp/gcc-3.2.1/gcc/intl ...look at this Mail in the gpc mailinglist. http://www.gnu-pascal.de/crystal/gpc/en/mail8944.html Answer f...

error msg
I might be in the wrong forum but here goes anyway. Whilst downloading from WinMX a .ISO file I get an error msg that reads as follows : file erro>(9) seek failed on an unnamed file. Thanks ...

GUI: Show error msg when callback function gives script error
Hi all, I could not find the answer to this question browsing google and this forum. I want that my GUI gives an error msg (like errordlg) when there is an error in the underlying matlab callback script, e.g.: Pressing pushbutton_A e.g. results in a Matlab command window error: "??? Error while evaluating uicontrol Callback" Now my GUI does nothing but I want my GUI to then give a popup message that the entered values are incorrect. How to do this? Thanks Roel "Roel " <r.a.massink@gmail.com> wrote in message <htm04c$km9$1@fred.mathworks.com&...

Best error control code for 200 bit msg with 60 errors
I want to send messages of 200 bits with 60 possible errors. Which error correcting code should I use that gives the highest rate for these parameters. Faisal Faisal wrote: > I want to send messages of 200 bits with 60 possible errors. Which > error correcting code should I use that gives the highest rate for > these parameters. > It depends. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com Faisal wrote: > I want to send messages of 200 bits with 60 possible errors. Which > error correcting code should I use that gives the highest ra...

error when compiling source that include sys/msg.h and linux/msg.h
Hi newsgroup, I need to do some ipc with message queues and want to know the max message size. I understand this information is in MSGMAX located in <linux/msg.h> But if add this line to my source the compiler bothers about redefiniting some ipc structs... What am I doing wrong here? Greetings from Germany Johannes Below are some information about my system and some test code... OS: Debian GNU/Linux 4.0 Kernel: Linux devel3 2.6.18-xen-3.1-2-686 #1 SMP Mon Jun 16 17:34:13 CEST 2008 i686 GNU/Linux Compiler: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21...

LDAP error msg.
//sysinfo Solaris 10/SPARC Sun DSE LDAP 6.0 // I've got alot of this one in my logs: error -5962 (The value requested is too large to be stored in the data buffer provided.). google doesn't say much but I've read all the docs and come to this conclusion. It seems it's an old remains from the LDAP proxy server where you can control the Nagle algorithm with a parameter setting. If this is possible in DSE v6.0 then it's not documented.. Any input would greatly appreciated. Rgds /PL ...

Displaying error msg
Hi all,, In matlab GUI , How can I say that if the user click a button "B" and the axes "X" is empty ( I mean there is no image displayed on the axes) , an error message is displayed ? Thanks all =) if ~any(cellfun(@(x) strcmp(x,'image'),get(findobj(gca),'type'))) error(...) end Matt Fig wrote: > if ~any(cellfun(@(x) strcmp(x,'image'),get(findobj(gca),'type'))) > error(...) > end Shorter: if isempty(findall(gca, 'type', 'image')) error(...) end "Matt Fig" <spamanon@y...

ModelSim Error Msg
Hi - I am a newbie ModelSim 5.6 SE user and am trying to troubleshoot this error - ______________________________________________ # -- Loading package standard # ** Error: (vcom-19) Failed to access library 'unisim' at "unisim". # No such file or directory. # ERROR: ../simulation/system_init.vhd(5): Library unisim not found. # ERROR: ../simulation/system_init.vhd(7): VHDL Compiler exiting # ERROR: C:/Modeltech_5.6/win32/vcom failed. # Error in macro ./system.do line 3 ___________________________________________ # My system.do file is : ________________________ do system_i...

Strange error msg.
I am maintaining a Fortran program of ~ 10000 lines of code which _used_ to behave friendly. Now, the program randomly crashes with the following message: jwe0020i-u An error was detected during an abnormal termination process. The behaviour is not exactly reproducable, sometimes a simple restart of the program doesn't end up in an error. Has anybody got an idea, where to start searching for a coding error? Compiler: Lahey LF59, 5.6h OS: Windows XPProfessional, SP2 Squirrel <joe.eichhorn@gmx.de> wrote: >I am maintaining a Fortran program of ~ 10000 lines of code which _use...

[9fans] error msg
YW55IGhpbnQgd2hhdCB0aGUgZm9sbG93aW5nIGNvdWxkIG1lYW4/IGZhdGFsPz8gdGhhbmtzLCAr K3BhYy4NCiANCmxvY2sgMHg4MDJmZTQxNCBsb29wIGtleSAweGRlYWRkZWFkIHBjIDB4ODAxYTI1 YjUgaGVsZCBieSBwYyAweDgwMWEyODFjIHByb2MgMzk3NA0KMzk3OTogY2F0IHBjIDgwMWIwY2Uz IGRiZ3BjIDJhZTUgRmF1bHQgKFJ1bm5pbmcpIHV0IDBzdCAzNzAgYnNzIDcwMDBxcGMgODAxYTg3 ZjMgbmwgMCBuZCAwIGxwYyA4MDEyNTQ5MyBwcmkgMw0KIA0KIA0K On Thu Jan 6 05:34:49 EST 2005, cej@gli.cas.cz wrote: > any hint what the following could mean? fatal?? thanks, ++pac. > > lock 0x802fe414 loop key 0xdeaddead pc 0x801a25b5 held by pc 0x801a281c proc 3974 > 3979: cat pc 801...

xsql error msg
I tried to configure xsql on Oracle9iAS. When I pointed the browser to http://localhost:7777/xsql/index.html, I got the following error message: Not Found The requested URL /xsql/index.html was not found on this server. ---------------------------------------------------------------------------- ---- Oracle HTTP Server/1.3.22 Server at 192.168.1.100 Port 7777 ==================== When I pointed it to "http://localhost:7777/xsql/", I got the following error message: Forbidden You don't have permission to access /xsql/ on this server. ----------------------------------------...

reg error msg
can anyone say how to display an error message by terminating the program if an error occurs without closing matlab ??? malathi d wrote: > can anyone say how to display an error message by terminating the > program if an error occurs without closing matlab ??? I don't think I understand the question, but _maybe_ you wish to look at the try/catch construct, and error(). Walter Roberson <roberson@hushmail.com> wrote in message <hr9u2l$c7p$1@canopus.cc.umanitoba.ca>... > malathi d wrote: > > can anyone say how to display an error message by terminating...

FEMLAB error msg
Hello there I am running femlab to solve set of equations and I get the following error when I star the colver (few seconds after run) transpose on ND array is not defined where is the problem? Thank you ...

script error msg
hi all, I use rsac subroutines to plot sac data. I haven't had any problem with this what so ever up to now but the last time I used it gave me this error. "attempt to execute SCRIPT plot as a function" I am reletively new to matlab, hence couldn't figure out the problem. I am much appreciative for any comments ! Januka. Januka Attanayake wrote: > > > hi all, > I use rsac subroutines to plot sac data. I haven't had any problem > with this what so ever up to now but the last time I used it gave > me > this error. > "attempt to execute SCRIP...

Error msg on IF Then #2
I corrected the problem. Thanks if cext&date ne ('B','Z') then status='GOOD'; else if cext&date = 'B' then status ='BAD'; else if cext&date = 'Z' then do; if nrea&date = 89 then status ='BKRP'; else if nrea&date = 10 then status ='DELE'; else if nrea&date = 88 then status ='DELE'; end; else status='BAD '; ...

DBC Error Msg
When trying to define a SAS/ACCESS IMS definition, I use the following line: ITEM='RTN-FREQ-CHG-EFFEC-DATE' LV=02 DBF=$CHAR8. DBC=MMDDYY8.; And I get this error message: ERROR: DB CONTENT/INITIAL VALUES FIELD FOR ITEM RTN_FREQ_CHG_EFFEC_DATE IS INVALID. Does any one have any idea what is wrong? Jim ...

Error msg on IF Then #3
My correction still does not work correctly. Here is a sample of the data: OUTPUT val cext nrea status Z 94 BAD B BAD 55 GOOD C GOOD Z 88 DELE A GOOD Z 10 DELE Z 89 DELE if cext&date ne ('B','Z') then status='GOOD'; else if cext&date = 'B' then status ='BAD'; else if cext&date = 'Z' then do; if nrea&date = 89 then status ='BKRP'; else if nrea&date = 10 then status ='DELE'; else i...

error msg meant ?
Data file <libname>.adhoc.DATA is in a formata native to another host or the file encoding does not match the session encoding. Cross Environment Data Access will be used, which may require additional CPU resources and reduce performance. Its not an error message its a note : CEDA is a simple strategy for file access across a network. CEDA enables you to read a network-mounted SAS file from any directory-based operating environment that runs SAS 8 or later, regardless of the file format of the SAS file being accessed. For example, CEDA enables a PC to read network-mounted SAS fi...

Puzzling error msg.
So far in my experience with Python, it's error messages have been clear, concise, and quite good at fingering my errors. However, the message below has me stumped. The routine in question has been running for weeks with no problems, then yesterday I got the following: Traceback (most recent call last): File "./Connection_Monitor.py", line 146, in <module> Google_up, Google_summary, Google_RTT, Google_stddev = Google.connection_test() File "/Users/wrw/Dev/Python/Connection_Monitor/Version2.2/WorkingCopy/network.py", line 101, in connection_test ...

lsqlin error message
I am unsure how to react (modify the inputs, or change the way the problem is posed, ???) when lsqlin produces the following error message; ??? Error using ==> planerot at 18 Not enough input arguments Error in ==> qrinsert at 94 [G,R(p,j)] = planerot(R(p,j)); Error in ==> optim\private\qpsub at 649 [Q,R] = qrinsert(Q,R,CIND,A(ind,:)'); Error in ==> lsqlin at 307 [X,lambdaqp,exitflag,output,dum1,dum2,msg]= ... The inputs to lsqlin have the following dimensions (LargeScale is turned off in options); [x,resnorm,residual,exitflag,output,lambda] = lsqlin(...

Weird Error Msg
Hi all !! I am working on file and string searching. while executing my code , i am getting this strange error msg. i tried everything but cudnt crack what tclsh is trying to tell me ... here is the complete error msg: list element in quotes followed by "." instead of space while executing "foreach Str $TestStr { set result [string match ABC $Str] if {$result==1} { puts $result } } " (procedure "main" line 18) invoked from within "main" (file "TestBedF.tcl" line ...

Re: Error msg on IF Then
Try looking at else status='BAD '; else status='GOOD'; remove one and I bet it works. HTH Toby Dunn -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nicole Bibb Sent: Wednesday, June 02, 2004 2:12 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Error msg on IF Then Can someone tell me what is wrong with this IF-THEN block if cext&date = 'B' then status ='BAD'; else if cext&date = 'Z' then do; if nrea&date = 89 then status ='BKRP'; else if nrea&date =...

ajc error msg
Hi all, I am kind of confused by the following error message: when invoking, "ajc -classpath ... FooAspect.java", where FooAspect reference types from the classpath. "FooAspect.java:68 error formal unbound in pointcut pointcut run(A a, P p): (target(p) && args(a) && execute(public P+.runa(A)));" I don't see anything wrong with the pointcut I defined. And if the error is unrelated to this pointcut (i.e., something wrong else where trigger this), then it's just bad design choice in ajc. In any case, this *is* the first error msg I got from ajc....