[Top][All Lists]

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

Re: A tiny problem ...

From: Doug Stewart
Subject: Re: A tiny problem ...
Date: Mon, 1 May 2017 16:03:45 -0400

On Mon, May 1, 2017 at 3:57 PM, Dr.-Ing. Dieter Jurzitza <address@hidden> wrote:
Dear listmembers,
I am using a peace of code as shown below:

"signalfilt" is a low pass filtered vector of 44100 complex elements, "noise"
a similar but uncorrelated one of the same size.

"rmsval" computes the rms value of an arbitrary (complex) input vector

****************** SNIPP **********************


for i=1:NUMEL
****************** SNAPP **********************

What I actually do here is some kind of correlation measurement I do not plan
to dive too deep into right now. The loop takes about 6s on my computer given
the dimensions of the vectors and numbers as listed above.

The shift operation is the most costly one in the loop, say about 10% longer
than the rmsval of the vector difference below.

If I had to implement this in "C" I would put b two times one behind the other
into memory, rather than actually shifting I would only increment the start
address pointing to that new "b" as used within the loop by one for each loop,
thereby avoiding any real shift at all. This way I could replace a shift of
44100 elements by one single pointer increment.

However, I cannot see a way to do this in octave, as there are no pointers
AFAIK but maybe one much more experienced user in the list has a good idea for

By the way, I am using octave 4.2, but this should not have a significant
impact IMHO.

Thank you very much for your efforts,

Dieter Jurzitza
Dr.-Ing. Dieter Jurzitza                    76131 Karlsruhe

Help-octave mailing list

try this
b=[0 0 a]
is that what you want?

DASCertificate for 206392

reply via email to

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