%  Demontration of Matlab commands, September 8, 1997

fs=50e6;
fs=50e6

fs =

    50000000

t=(1:100)/fs;
plot(t)
f0=5e6;
g=sin(2*pi*f0*t);
plot(t,g)

M=4;
t=(0:1/fs:M/f0);
g=sin(2*pi*f0*t);
plot(t,g)

dft=fft(g);
N=length(dft);
f=(0:N-1)/N*fs;
plot(f,abs(dft))
plot(f,imag(dft))
plot(f,real(dft))
filt=ones(1,fs/f0);
plot(conv(filt,g))

