fS = 8192; t = 0:fS-1; t = t/fS; w = 2*pi*440; x = sin(w*t) + .2*sin(2*w*t) + .1*sin(3.01*w*t) + .4*randn(1,fS); % the above script simulates one second of sampled values % of an oboe playing 440 Hz % %Routine 4.1 spectral analysis n= 8192; m = 400; M = 1400; % xhat = fft(x,n)/n; % f = 0:n-1; f = f(m:M); yhat = xhat(m:M); plot(f,abs(yhat),'k-')