write an m-file samplingm which will take as an


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

x=(sin([0:pi/8:4*pi]))

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?

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: write an m-file samplingm which will take as an
Reference No:- TGS0206818

Expected delivery within 24 Hours