lsqlin error msg --"out of memory"

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
iloveyu
9/3/2010 12:10:05 AM
comp.soft-sys.matlab 206940 articles. 560 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies
278 Views

Similar Articles

[PageSpeed] 26
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
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
Marcus
9/4/2010 1:23:30 AM
Reply:
Similar Artilces:

Encoding error
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C34A18.0FFE5020 Content-Type: text/plain; charset="iso-8859-1" I get the following error for the list item below. I know I have to encode it, but am unsure how or where to write that in. I am new to python and have had good luck thus far. Any help is greatly apprecieated. I am not on the list, so a response to me is appreciated. UnicodeError: ASCII encoding error: ordinal not in range(128) eainfo = doc.createE...

Question for Error with GUI SOS
??? Error using ==> hgload at 156 Recursion occurs when loading C:\Users\marianna\Desktop\????????_2\test.fig Error in ==> openfig at 72 [fig, savedvisible] = hgload(filename, struct('Visible','off')); Error in ==> gui_mainfcn>local_openfig at 286 gui_hFigure = openfig(name, singleton, visible); Error in ==> gui_mainfcn at 159 gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible); Error in ==> test at 42 gui_mainfcn(gui_State, varargin{:}); Error in ==> @(hObject,eventdata)test('figure1_Cr...

How to eliminate multiple declaration error for a symbol present in both libs( without modifying libs)
Hi All, I have two libs (libFirst.a and libSecond.a). Both libs contains a common function func(). Now I want to link an application "app" with these two libs as gcc -o app libFirst.a libSecond.a app.c. It gives( and it should ) multiple declaration error . Is there any way to tell the linker which func() declaration it must select. NOTE: app need to be linked two both these libs. Thanks and regards, Raman Chalotra. Raman wrote: > Hi All, > > > I have two libs (libFirst.a and libSecond.a). Both libs contains a > common function func(). Now I want to link a...

Where is the error?
Hi there, My code below attempts to load up a window for rendering OpenGL, although it doesnt even get as far as the OpenGL stuff. It was working until I did some code changes, but now when I run it, it crashes at CreateWindowEx(). It is probably something really obvious but I cannot determine the cause, can anybody help? Thanks Allan // WinGalaga.cpp int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; // Windows Message Structure ghInstance = hInstance; if (core.NewWindow()) SendMessage(ghwnd, WM_CLOS...

Re: error msg meant ?
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 files that are in UNIX file format. Note: Prior to SAS 8.2, CEDA was packaged with SAS/CONNECT, which requires a separate license. CEDA is now included as part of Base SAS. CEDA runs transparently. You can access a supported SAS file without knowing t...

error connecting to oracle
hi, i'm getting the following error when i try to run the code below to connect to an oracle db: java.lang.ClassnotfoundException:oracle.jdbc.driver.OracleDriver java.sql.SQLException No suitable driver. i'm using jdk1.4 installed on a Windows NT 2000 machine. I don't have any oracle client installed on my machine. I'm basically connected to our office network. The programs compiles but when I try to run it i'm getting the error above. I'm fairly new to java & JDBC. I'm not the Oracle administrator as well. i've browsed the group fairl...

power network with AD motor ( ERROR) #2
Hi Every one! I need help. I'm trying to simulate a micro-hydro power plant - network with a AD motor. The network (HTG-generator-line-transfo-RLC loads)is working properly but when I try to add a AD model from the SimPowerSystem every thing does throng. Please help me to find a away out to this problem. Thanks Kazingufu ...

ModelSim Error : "Fatal error in Process determine_phase_shift" during post synthesis of Xilinx vhd
Im am trying to simulate a full design (top entity of a Xilinx Project) and stumble of a modelsim error: Netgen produces the full *.vhd and compiling it from ModelSim ended with no error. But after starting the simulation, the following error occurs: "Fatal error in Process determine_phase_shift at 7814" In the Unisim.Lib (which is correctly referenced in the full vhdl) I am observing the attched lines, where in 7814 it says " ps_step_int := (PS_STEP / 1 ps ) * 1; " Well, ps_step_int seems to be initialized correctly but read nowhere in the whole lib. Anybody can make...

Cursed Error Messages
Hi everyone, How do I get the error message? I have a very long sproc that needs to be done in one transaction. I have an error happening somewhere in the middle, but with a low enough severity it doesn't terminate the procedure. To make sure I don't miss any errors, I am storing @@error after every statement: If @Error<=@@error Set @Error=@@error that way at the end I can say if @error<>0 rollback trans. How do I get the error message? I have the number, and what I get from sysmessages has the wildcards in it %d and so on. Also , I can't use Xact_Abort, the web user pe...

mechanize timeout errors
I am using mechanize for scraping some urls. begin page = agent.get(url) rescue puts "oops!!" end catches invalid urls etc. , but how to I handle timeout errors? In particular this is the error I get : request-header: accept => */* request-header: user-agent => WWW-Mechanize/0.5.1 (http://rubyforge.org/projects/mechanize/) /usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::Error) from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout' from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout' Could someone als...

DB_LOCALE error
Hi Guys, IDS 9.21 on AIX I'm getting this error when i run a query from one informixserver to another: 23197: Database locale information mismatch i.e. : select * from stxdemo@apmstxinst1:trtsrd_rec Do you have any ideas about it? There is no DB_LOCALE enviroment value on both informixserver's ... how can i set it? wich one is the right value? where i can get it ? sending to informix-list ...

Scilab error
Hello, I am solving for a solution of a linear problem of the form dx/dt = A x(t) + B u(t)..I want to find the solution at 1000 time instances..I followed the example in Scilab(in the help section).. I noticed that the ode solver only give me up to 54 time instances.. I am minimizing a cost function..But I noticed that at some values of my parameters, specifically at these values :X=[0.8222060 2.113277 1.648543 11.614405 -0.0283654 0.0438632 0.0169869], the error msg 'invalid index comes up' Particularly the error occurs on this line "numsol=ode("stiff",w0,...

Sam|unknown error
Sam is displaying the following message when deleting a user; failed to remove the user "xxxx". There was an unknown error in =A6 =A6 "/usr/sbin/userdel". The output from this command was: sh: 3656 Memory fault.Can someone help to enable me to completely remove the user/s .Including all their home directory files Hi, I think sam is HP-UX command, not Informix. You may post comp.sys.hp.hpux. Regards. -- Tsutomu Ogiwara from Tokyo Japan. >From: "PapaKiKi" <agwanzura@okzim.co.zw> >To: informix-list@iiug.org >Su...

simulink error #10
Hi all, I am working in simulink as part of my project and while using the for iterator block i am getting the following error: Invalid dimensions encountered while propagating dimensions from output port 1 of 'proj1/For Iterator Subsystem/XY Graph/Mux' to input port 1 of 'proj1/For Iterator Subsystem/XY Graph/sfunxy'. During propagation, we are attempting to unify the dimensions of the multiplexed signal with dimensions {[1x2048],2048} to obtain the dimension 2. But i read in the news desk tht by clearing the variable/array during each iteratiion wil solve the problem.But how...

Error applying MITKRB5-SA-2007-002 on krb5-1.5
This is a multi-part message in MIME format. --===============1223043781== Content-Class: urn:content-classes:message Content-Type: multipart/signed; boundary="----=_NextPart_000_003E_01C7783F.828C3D10"; protocol="application/x-pkcs7-signature"; micalg=SHA1 This is a multi-part message in MIME format. ------=_NextPart_000_003E_01C7783F.828C3D10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Patch MITKRB5-SA-2007-002 is failing to apply on krb5-1.5: [rpmdev]$ patch -p0 <2007-002-patch.txt patching file src/kadmin/serv...

SQL Error 446377
Hi ! I am using MySQL database for a 3-4 years using the same Perl scripts. Till 6 months ago I had approx. 500k record updates/day with no problem. After that, I made some statistical enging, which does few million records per day. (Changed configuration to huge.cnf also). Now, from time to time, database connect fails and the error is Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) There is no problem with the file & permissions etc.. Could this be some performance problem rather than DBI & OS related ? Thx On Mon, 21 Jun 2004 ...

Re: Format error #3
Huang, yes I do. However I vse just tried to replace & with AND and got the same error message Irin "Huang, JS" <Huang.JS@principal.com> wrote: Do you mean "and" instead of "&"? -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Irin later Sent: Friday, March 30, 2007 12:43 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Format error I ran code and error log gave me the following message: 35 data home.Q(keep=r_Mem_num clm_mem_num mem_num incurred_dt clm_ndc); 36 set adm.phac; 37 where '01Jan05'd...

New Start-up error
I put in my Disk Warrior disk and selected it as the start up disk, intending to check and possibly re-do my directory. I am running X.2.6 and classic as 9.2.2 on an iMac. After choosing the DW disk as the start up disk, I hit restart. Everything shut down as expected, but on the re-start, the disk drive spun up for about three seconds and quit. Then I got a flashing icon I have never seen nor heard of. It was square, grey colored and contained a circular "map" the continents of the western hemisphere in blue. It continued flashing for about a minute (I hoped that the DW...

error message returned
when I send an email to a specific list, I get a bounce message indicating an invalid destination. I can't tell what the problem is. Here are the headers: From: Mail Delivery System <> To: Self Subject: Mail Delivery Failure. Date: Wed, 12 Jan 2005 15:16:32 X-PMFLAGS: 16512 0 1 L8IN64X1.CNM Delivery has failed on the enclosed message for the following reasons reported either by the mail delivery system on the mail relay host or by the local TCP/IP transport module: 550 [PERMFAIL] destination not valid within DNS Your original mail message follow...

Bash Error
Hello, I was using my Mac to write a bash script. However, I was suprised to see this come up in the terminal: mac@useless-computer:~$ bash: Mac's are fucking useless Any Help? On 2014-11-25 20:02:49 +0000, williamwright.orsk@gmail.com said: > Hello, > > I was using my Mac to write a bash script. However, I was suprised to > see this come up in the terminal: > > mac@useless-computer:~$ > bash: Mac's are fucking useless > > Any Help? Yeah... Get a better joke writer. In article <bd391b0b-08ba-4e74-92a5-24ca6479a0b2@go...

error 661
FMS 9v3 on XP server, FileMaker accessed via Terminal Services; set up by the clients IT who are reporting error messages: Subject: FMServer Warning 661 Client FileMaker Pro 9 Trial authentication failed ... FileMaker Server 9.0.2.151 on FMSRV reported the following event: 2008-03-18 08:38:01.315 +0930 Warning 661 FMSRV Client "FileMaker Pro 9 Trial" authentication failed on database "A_Scalpel_USER.fp7" using "IHC User [fmapp]". Contact information not specified. Subject: FMServer Warning 661 Client FileMaker Pro 9 Trial authentication failed ... FileMa...

LAN with database giving error messages
The following is only for IE running under Windows. Its a client "requirement". Anyhow, I'm connecting via a web page to a database. Both the page and the database are on a LAN. The database has a DSN (as opposed to needing a connection string). Everything appears to be working as expected except that whenever there's any attempt at talking with the database these two errors pop up: "This website uses a data provider that may be unsafe. If you trust the website, click OK, otherwise click Cancel." "This website is using your identity to access a datasou...

query error
I have a query that I expect to return 3 or 4 entries -- but I seem to be getting only the most recent entry, repeated 4 times. What am I doing wrong here? $query="SELECT artistID,email,city,state,country from artists WHERE email='$email'"; $result=mysql_query($query) or die(mysql_error("Could not execute query.")); if (mysql_num_rows($result) > 0){ $alreadylisted = "1"; echo "<CENTER>$email is already in our database. Are you listed below?</CENTER><BR>"; while($row = mysql_fetch_array($result)) {...

error library
HI!! i need help, i'm using rtai under fedora 13 and matlab r2009a, i did all the installation, but when i tried to build a test archive i got this error: gcc -static -o ../test test.o rtGetInf.o rtGetNaN.o rt_logging.o rt_matrx.o rt_printf.o test_data.o rtmain.o rt_sim.o rt_nonfinite.o sfun_rtai_scope.o sfun_rtai_meter.o sfun_rtai_led.o /usr/realtime/lib/liblxrt.a -lpthread -lm /usr/bin/ld: cannot find -lpthread collect2: ld devolvió el estado de salida 1 gmake: *** [../test] Error 1 so, anybody can help?, where does matlab load the libraries? the libpthread exists ...

error 8 File permission error while building executable for a RT
I got error 8 File permission error while building executable for a RT. It happened always after build, I mean new startup.rtexe and startup.alias files have been created. At the build properties, it was set use default .alias file. I had the executable built successfully at one time. &nbsp; The detail message is: Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference: Error 8 occurred at Open/Create/Replace File in RTBEP_Generate_Deploy_Instructions.vi-&gt;RTBEP_Invoke_Build_Engine.vi-&gt;RTBUIP_Build...