|
From: | Kire Pudsje |
Subject: | Re: A tiny problem ... |
Date: | Mon, 1 May 2017 23:34:33 +0200 |
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 **********************
NUMEL=5000;
atten=zeros(1,NUMEL);
b=signalfilt+noise;
b=b/rmsval(b);
for i=1:NUMEL
b=shift(b,1,2);
atten(i)=rmsval(signalfilt-b);
endfor
****************** 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.
[Prev in Thread] | Current Thread | [Next in Thread] |