help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a\b operation slow


From: David Bateman
Subject: Re: a\b operation slow
Date: Sun, 26 Feb 2006 12:36:43 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hartmut Behrens a écrit :

hello all,
I have two matrices, a = (20x1) and b = (1x20) for which i would like to calculate M = a\b. The problem is that this operation takes an extremely long time (greater than an 1hour) on a Pentium4 (Celeron 2.6GHz) PC. Do you have any suggestions on how to speed up this calculation in octave? Kind Regards,
hartmut

I think there is a problem here. For "a\b" the number of rows in "a" must equal the number of rows in "b". So I suspect that either "a" or "b" must be transposed. In both cases I get reasonable solve times. Consider

octave:1> a = randn(20,1); b = randn(1,20);
octave:2> tic; a\b; toc
error: operator \: nonconformant arguments (op1 is 20x1, op2 is 1x20)
error: evaluating binary operator `\' near line 2, column 6
octave:3> tic; a'\b; toc
ans = 0.031426
octave:4> tic; a\b'; toc
ans = 0.0033250
octave:5> OCTAVE_VERSION
CTAVE_VERSION = 2.1.64

What version of octave are you using? If you really can do a\b with the version of octave you are using, its a certain segmentation violation and then all bets are off as to how lapack/atlas will react to that, and one hour of computation might be possible...

D.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]