Data Analysis - The MathWorks - #20

/ 220


catalogue search
P. 01
P. 02
P. 03
P. 04
P. 05
P. 06
P. 07
P. 08
P. 09
P. 10
P. 11
P. 12
P. 13
P. 14
P. 15
P. 16
P. 17
P. 18
P. 19
P. 20
P. 21
P. 22
P. 23
P. 24
P. 25
P. 26
P. 27
P. 28
P. 29
P. 30
P. 31
P. 32
P. 33
P. 34
P. 35
P. 36
P. 37
P. 38
P. 39
P. 40
P. 41
P. 42
P. 43
P. 44
P. 45
P. 46
P. 47
P. 48
P. 49
P. 50


See other catalogues for The MathWorks

Text version of the page
1 Data Processing
vector 6.The output y(n) is a linear combination of current and previous inputs, x(n) x(n - 1)..., and previous outputs, y(n -1) y(n - 2)... .
Example: Moving Average Filter
You can smooth the data in count.dat using a moving-average filter to see the average traffic flow over a 4-hour window (covering the current hour and the previous 3 hours). This is represented by the following difference equation:
y(n) = 4 x(n) + 4 x(n -1) + 4 x(n - 2) + 4 x(n - 3)
The corresponding vectors are a = 1;
b = [1/4 1/4 1/4 1/4];
Extractthe firstcolumnof count and assign it to the vector x:
x = count(:,1);
The 4-hour moving average of the data is calculated by
y = filter(b,a,x);
The filtered data, represented by the solid line in the plot, is the 4-hour moving average of the count data. The original data is represented by the dashed line.
1-12

pageCatalog pdf di En 2012-06-22-01