hi all, i am faced with a simple yet intriguing problem. i am running octave 2.1.73. i am trying to multiply two matrices (29004 x 120) (120 x 29004) inside a program. octave simply quits when it executes the command. is there anything that i can do. regards, Maverick Mint.

# The Dissapearance Act -- Octave

Started by ●June 25, 2007

Posted by ●June 25, 2007

On 25 Jun, 07:19, maverickm...@gmail.com wrote:> hi all, > i am faced with a simple yet intriguing > problem. i am running octave 2.1.73. > i am trying to multiply two matrices (29004 x 120) (120 x 29004) > inside a program. octave simply quits when it executes the command. is > there anything that i can do.An NxM by MxN matrix multiplication produces a NxN matrix, or 29004 x 29004 elements in your case. Assume each element to take 8 bytes (16 if you are working with complex matrices) and find that this simple expression requires a mere 29004^2*8 = 6.7e9 bytes or 6.7 GBytes of memory. What to do? Re-structure the algorithm so you avoid the whole thing. Bumping into that sort of matrix expression is an almost certain indicator that you did something wrong up-stream from where the problem occurs. Rune

Posted by ●June 25, 2007

maverickmint@gmail.com writes:> hi all, > i am faced with a simple yet intriguing > problem. i am running octave 2.1.73. > i am trying to multiply two matrices (29004 x 120) (120 x 29004) > inside a program. octave simply quits when it executes the command. is > there anything that i can do.Upgrade to a version that's been released within the last three years. I believe the current stable version is 2.9.9. What platform are you running on? -- % Randy Yates % "Bird, on the wing, %% Fuquay-Varina, NC % goes floating by %%% 919-577-9882 % but there's a teardrop in his eye..." %%%% <yates@ieee.org> % 'One Summer Dream', *Face The Music*, ELO http://home.earthlink.net/~yatescr

Posted by ●June 26, 2007

On Jun 24, 10:52 pm, Rune Allnor <all...@tele.ntnu.no> wrote:> On 25 Jun, 07:19, maverickm...@gmail.com wrote: > > > hi all, > > i am faced with a simple yet intriguing > > problem. i am running octave 2.1.73. > > i am trying to multiply two matrices (29004 x 120) (120 x 29004) > > inside a program. octave simply quits when it executes the command. is > > there anything that i can do. > > An NxM by MxN matrix multiplication produces a NxN matrix, or > 29004 x 29004 elements in your case. Assume each element to > take 8 bytes (16 if you are working with complex matrices) and > find that this simple expression requires a mere > > 29004^2*8 = 6.7e9 bytes > > or 6.7 GBytes of memory.That's assuming his matrices aren't extremely sparse. There are algorithms that should use a lot less memory if there are only a small number of non-zero matrix elements in either matrix. Don't know if octave uses these algorithms. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M

Posted by ●June 26, 2007

On 26 Jun., 07:36, "Ron N." <rhnlo...@yahoo.com> wrote:> On Jun 24, 10:52 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > On 25 Jun, 07:19, maverickm...@gmail.com wrote: > > > > hi all, > > > i am faced with a simple yet intriguing > > > problem. i am running octave 2.1.73. > > > i am trying to multiply two matrices (29004 x 120) (120 x 29004) > > > inside a program. octave simply quits when it executes the command. is > > > there anything that i can do. > > > An NxM by MxN matrix multiplication produces a NxN matrix, or > > 29004 x 29004 elements in your case. Assume each element to > > take 8 bytes (16 if you are working with complex matrices) and > > find that this simple expression requires a mere > > > 29004^2*8 = 6.7e9 bytes > > > or 6.7 GBytes of memory. > > That's assuming his matrices aren't extremely sparse. There > are algorithms that should use a lot less memory if there are > only a small number of non-zero matrix elements in either matrix. > Don't know if octave uses these algorithms.Perhaps it went searching for them. :-) Regards, Andor