[Top][All Lists]

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

Re: octave vs. matlab vectorization

From: Jaroslav Hajek
Subject: Re: octave vs. matlab vectorization
Date: Mon, 14 Sep 2009 19:46:32 +0200

On Mon, Sep 14, 2009 at 7:43 PM, James Sherman Jr. <address@hidden> wrote:
>>ah, no! code 1 was *faster* under matlab! the ratio is 0.19:1
>>i find this result quite staggering.
> I ran those two codes with the matlab I have on my laptop ( R2008b)
> and got 16.9 for the for loops code and 3.54 for the vectorized code.
> I don't know why there would be such a discrepancy.  This may sound dumb,
> but are you sure you didn't confuse the two times?

IIRC, it may make a difference whether the code is in a
function/script/entered from cmd-line. Functions are best optimized, I

RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic

reply via email to

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