L=2^12;
n=[1:L];
freq=2*pi/L;
f=100; %fixed frequncy
f=100*rand(1); %random frequncy
x=sin(n*f*freq)';
ra=10*rand(1,L)'; %noise
x=2*sin(n*f*freq)';
x=2*sin(n*f*freq)'+ra; %noise+signal
%x=x-mean(x);% subtract mean
clf
figure(1)
plot(x)
figure(2)
y=fft(x);
plot(abs(y))
wavplay(x,44000)
figure(1)
