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);
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?

  • Welcome to gis.stackexchange! Could you clarify how this question relates to GIS? Currently, it seems like it might be better suited for stackoverflow. – underdark Mar 20 '14 at 18:56
  • Hello. This code is implemented in a gis application. – Bárbara Duarte Mar 21 '14 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.