Wednesday, 8 July 2015

qgis - Delayed moving average


I want to develop a plot of delayed moving average. The code for this in MATLAB is:


nr_pontos = 36;

coefs_filtro = ones(1, nr_pontos)/nr_pontos;
data_dma = filter(coefs_filtro, 1, data);
figure,plot(data)
hold on,plot(data_dma,'r')
hold off

But I want to develop this in python using numpy or scipy. I found the convolve function of numpy, but I think the results were not what I expected. Can you help me?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...