Hi, I try an example of decimation stated in matlab. But I don't get the result as shown in the example. What should I do? Below shows the result that I run in my matlab. The first image is from the examaple, the second image is the result that I get.
t = 0:1/4e3:1;x = sin(2*pi*30*t) + sin(2*pi*60*t);y = decimate(x,4);subplot(2,1,1)stem(0:120,x(1:121),'filled','MarkerSize',3)grid onxlabel('Sample Number')ylabel('Original')subplot(2,1,2)stem(0:30,y(1:31),'filled','MarkerSize',3)grid onxlabel('Sample Number')ylabel('Decimated')
Best Answer