[Scilab-users] user experience with moving average

David Chèze david.cheze at cea.fr
Wed Jan 16 11:00:08 CET 2013


Hi,

i've recently used the new function "conv" introduced since 5.4 version :
that's fine and easy to use, for example to apply simple filtering to
experimental data (sample time greater than 1s typically) with (arithmetic)
moving average (like in MS excel, where the use of this feature was quite
intuitiv while prior to 5.4 and conv function it was not so immediate for
people non skilled in signal processing and no simple test case were given
on the web). 

Moving average is a convolution product of the signal with door function
(see  http://fr.wikipedia.org/wiki/Moyenne_mobile
<http://http://fr.wikipedia.org/wiki/Moyenne_mobile>  ). 
Then it's easy with Scilab to compute this moving average and this basic but
common use may be mentionned in the help page for context search.
A=1:10; // experimental data
N=3; //number of samples over which you want to average
B=ones(N,1); // "door function"
C=1/N*conv(A,B); //resulting filtered data : /!\ check the size and
beginning/end of the result  and truncate for your need

David





--
View this message in context: http://mailinglists.scilab.org/user-experience-with-moving-average-tp4025691.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list