help-octave
[Top][All Lists]
Advanced

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

Re: Zero Crossing Rate - optimize implementation


From: c.
Subject: Re: Zero Crossing Rate - optimize implementation
Date: Fri, 17 Aug 2012 19:44:01 +0200

On 8 May 2010, at 04:22, jacek grabowski wrote:

> 2010/5/8 Akira Nishimura <address@hidden>:
> 
>> Nice solution !!
>> You can get rid of the for loop !
>> 
>>> zcr = diff(sign(s))~=0;
>> 
>> zcr_rate = sum(reshape(zcr(1:framesize*(FN-1)), framesize, FN-1), 1);
>> (...)
> 
> Well done gentlemens. I have no more questions.
> 
> -- 
> Jacek Grabowski

Just for completeness,
there is already a function called "zerocrossing" that does what you need in 
the "signal" package.
c.



reply via email to

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