|
"Derek O'Connor" <derekroconnor@eircom.net> wrote in message <gc8oph$hp6$1@fred.mathworks.com>...
> Can anyone explain the why I get an 'out-of-memory' error using x=linsolve(A,b). Here are the details:
>
> >> clear
> >> memory
> Maximum possible array: 5810 MB (6.092e+009 bytes) *
> Memory available for all arrays: 5810 MB (6.092e+009 bytes) *
> Memory used by MATLAB: 591 MB (6.195e+008 bytes)
> Physical Memory (RAM): 8189 MB (8.587e+009 bytes)
>
> * Limited by System Memory (physical + swap file) available.
> >> n=20000;A=rand(n,n);b=rand(n,1);x=zeros(n,1);
> >> memory
> Maximum possible array: 2753 MB (2.886e+009 bytes) *
> Memory available for all arrays: 2753 MB (2.886e+009 bytes) *
> Memory used by MATLAB: 3644 MB (3.821e+009 bytes)
> Physical Memory (RAM): 8189 MB (8.587e+009 bytes)
>
> * Limited by System Memory (physical + swap file) available.
> >> whos
> Name Size Bytes Class Attributes
>
> A 20000x20000 3200000000 double
> b 20000x1 160000 double
> n 1x1 8 double
> x 20000x1 160000 double
>
> >> x=linsolve(A,b);
> ??? Error using ==> linsolve
> Out of memory. Type HELP MEMORY for your options.
>
>
> MATLAB Version 7.6.0.324 (R2008a) 64 bit
> Operating System: Microsoft Windows Vista Ultimate 64 bit
> Version 6.0 (Build 6001: Service Pack 1)
> Dell Precision 690 2xQuadcore Xeon 2.33MHz, 8GB RAM.
Hi,
I think that your optimization problem is not well-posed. Generally, linsolve must return a solution very quickly...
I used it for constrained control allocation problems, and a feasible solution was returned in a few miliseconds :-).
Cheers,
V. Morio
PhD student in Automatic Control
IMS lab./University of Bordeaux, France
|