Write an m-file "sampling.m", which will take as an input: a signal and a sampling step and will display the sampled signal and the magnitude of its Fourier transform. sampling.m
function sampling(x,step) plot(x(1:step:end),'-o') plot(abs(fft(x(1:step:end))))
use x as the input signal
Run the function with step=1.Increase the sampling step 2,4,8.... and observe what happens with the spectrum.
What happens with the spectrum as the sampling step increases?
What should be the minimum sampling frequency (maximum sampling step) of a signal?