I have already learning to use downsample() function inside Matlab. However, I am wondering if it can be implemented using basic for loop or if statement. Can anyone help me? P.S Below is the code I have worked out, I would like to know if there is a different way to do it.
for i=1:M:length(x)
y=[y x(i)];
end
end
`