
fs=5000;     % sampling rate in Hz
T=1/fs;      % sampling period
N=500;       % number of points
t=(0:N-1)*T; % sampling grid
x=sin(2*pi*60*t);

plot(t,x)
pause

f=(0:N-1)*fs/N;
plot(f,abs(fft(x)));
pause;

axis([0 200 0 250])
pause;

%suppose we look at sgn of x

x=sign(x);
plot(t,x)
axis([0 .1 -1.5 1.5])
pause

plot(f,abs(fft(x)));

%axis([0 200 0 250])
