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 204535 articles. 548 followers. Post

2 Replies
258 Views

Similar Articles

[PageSpeed] 5


  • 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 or not an error ...
I was just testing out the R4 REXX thingy, and it found an error in the following program. My question is this, is it an error or not? My PC/REXX and Regina don't barf on it, but I thought they should've. _____________________________________________ /**/ ?.='' ?.z='batman' trace i if ?.z\==''then do; say '?.z=' ?.z; end ______________________________________________ Note that there is space before the THEN. I'm not sure of the exact rules for parsing an IF statement, I know that THEN is a "reserved" keyword when an IF statement is...

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...

When is an error not an error?
The Java language specification claims in: 8.8.7.1 Explicit Constructor Invocations .... "If an anonymous class instance creation expression appears within an explicit constructor invocation statement, then the anonymous class may not refer to any of the enclosing instances of the class whose constructor is being invoked." Helpfully it gives an example: "For example: class Top { int x; class Dummy { Dummy(Object o) {} } class Inside extends Dummy { Inside() { super(new Object() { int r = x; }); // err...

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...

When is an error not an error?
When it's OSS slopware, of course. http://www.angelfire.com/planet/dfs0/Knode_send_error.png On 2006-09-12 02:42, * DFS wrote: > When it's OSS slopware, of course. > > http://www.angelfire.com/planet/dfs0/Knode_send_error.png > Well, some time ago I had a problem with OE - too long reference line to other posts, and OE of course refused to send... then crashed. Should I name it a feature? -- Andrea On Tue, 12 Sep 2006 03:25:29 +0200, Andrea wrote: > On 2006-09-12 02:42, * DFS wrote: >> When it's OSS slopware, of course. >> >> http:/...

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...

Objc Nubie: Errors Errors Errors
I've been toying with learning ObjC/Cocoa for sometime and finally got over the hump of "brackets vs. braces" but am wondering why my little test throws so many warnings when run: // gcc FileTest.m -o FileTest -ObjC -framework Cocoa #include <Cocoa/Cocoa.h> #include <Foundation/Foundation.h> int main( void ) { NSString * str = [ [NSStringalloc] initWithString:@"~/samplefromcocoa.txt" ]; NSString * full = [ NSString stringWithString: [str stringByExpandingTildeInPath ] ]; if( [ [NSFileManager defaultManager] fileExistsAtP...

error msg from OS?
Hi, I got an error message: 202,0,1006, could anybody tell me how I can derive this error to meaningful string message? It seems to me that this error message comes from OS(HPUX11), any idea? Thanks wenmang wrote: > Hi, > I got an error message: 202,0,1006, could anybody tell me how I can > derive this error to meaningful string message? It seems to me that > this error message comes from OS(HPUX11), any idea? > Thanks http://docs.hp.com/cgi-bin/doc3k/B3692390021.13753/67 Thanks. I still have problem to interpret it. Since the error msg is 202,0,1006, how is the msg string c...

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...

What is the meaning of this error msg?
Hi, I have a function: function F=myfun5(x) F(1)=sin(x(1))+x(2)^2+log(x(3))-7 F(2)=3*x(1)+2^x(2)+1-x(3)^3 F(3)=x(1)+x(2)+x(3)-5 When I used fsolve: g=fsolve(@myfun5,[1, 2, 3]) MATLAB prints a msg before giving the correct values of x(1), x(2) and x(3): Optimization terminated: first-order optimality is less than options.TolFun. g = 0.5991 2.3959 2.0050 So what does "Optimization terminated: first-order optimality is less than options.TolFun" mean? loh_boon_kiat wrote: > > > Hi, > > I have a function: > > function F=myfun5(x) > > F(1)=s...

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...

Array error msg
I am getting an error that says: WARNING: Defining an array with zero elements. Not sure why because input dataset has 1785 records. Data sumscore2; set workfn.mthscore2 ; array noact [*] noacct: ; array noco [*] noco: ; array cobal [*] cobal: ; array clbal [*] clbal: ; array osbal [*] osbal: ; array cocl [*] cocl: ; array wact [*] wtgact: ; array wead [*] wtgead: ; sum_noact = sum (of noact(*)) ; sum_noco = sum (of noco(*)) ; sum_cobal = sum (of cobal(*)) ; sum_clbal = sum (of clbal(*)) ; ...

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 ...