When I use the DECIMATE function using the following command:
load p3.txtplot(p3(:,1),p3(:,2),'k.');grid on; hold on;y=decimate(p3(:,2),31);y2=decimate(p3(:,2),31,n);t=linspace(p3(1,1),p3(end,1),255)';p3dec31=[t y];plot(p3dec31(:,1),p3dec31(:,2),'g*',t,y2,'go');[mean(p3(:,2)) mean(y)]
I observe a shift in the mean when viewing the plot. I can also verify the same from the command line:
[mean(p3(:,2)) mean(y)] as these two values are different.
Best Answer