Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 64;
- n = 0:N-1;
- phi1 = 2*(rand-0.5)*pi;
- omega1 = pi/6;
- phi2 = 2*(rand-0.5)*pi;
- omega2 = 5*pi/6;
- w = randn(1,N); % noise
- x = 2*exp(1i*(n*omega1+phi1))+4*sin(n*omega2+phi2);
- h = rectwin(N).';
- x = x.*h;
- X = abs(fft(x));
- f = f = Fs/Nsamples*(0:Nsamples/2-1); % Prepare freq data for plot
Add Comment
Please, Sign In to add comment