sf = 44100;
sf = 96000;
n0 = sf;
f0 = 440; % frequency of the signal

T = n0/sf;
freq_base = 1/T;
freq = [0:n0-1]*freq_base;
tic;
s = arecord(n0,2,sf,'hw:0,0');
toc

figure(1)
plot(freq,abs(fft(s(:,1))))
xlim([0,2000])

figure(2)
plot(s(:,1))

data_period = 100;
dt = 1/sf;
T_est = dt*data_period
Freq_est = 1/T_est
