I have a very long data up to 8 millions of samples and want to decimate it to order of 1000s. I'm using following Matlab code to do this:
f = numberOfSamples/N; %N is number of points after decimation p = factor(f); % temp = rawData; %with length of numberOfSamples for i = 1:length(p) temp= decimate(temp,p(i),10); %decimate with 10th order iir filter end
Number of samples before and after decimation is not known, but the ratio, i.e. decimation number, is an integer for sure(that's given.) In other words, those are input to my program. How can I decimate(including the decimation filter) the data in chunks and have the same result? One chunk computes some part of the decimated signal and the other chunk computes another part, etc. I hope question is clear, any help is appreciated.