Mmovavg-func
This function is for calculating modified moving averages. Average value at the starting point = n is calculated by Movavg function, and then other points are calculated by formula similar to Emovavg function with weighting factor .
where is the nth point calculated by movavg(x, n-1,0).
vector mmovavg(vector vd, int n)
vd
n
Return the modified moving average vector.
// Col(2) will be filled with modified moving average value at each point, with stating point = 10. for(ii=1;ii<=30;ii++) col(1)[ii] = ii; col(2)=mmovavg(col(1),10);