P. 1
Mathematics of the Discrete Fourier Transform

# Mathematics of the Discrete Fourier Transform

4.88

|Views: 1,530|Likes:

### Availability:

See more
See less

02/22/2013

pdf

text

original

Now let’s apply this window to the sinusoidal data:

% Use the Blackman window on the sinusoid data

xw = [w .* cos(2*pi*n*f*T),zeros(1,(zpf-1)*N)]; % windowed, zero-padded data

X = fft(xw);

% Smoothed, interpolated spectrum

% Plot time data

figure(6);

subplot(2,1,1);

plot(xw);

xlabel(’Time (samples)’); ylabel(’Amplitude’);

text(-50,1,’a)’); hold off;

% Plot spectral magnitude in the best way

spec = 10*log10(conj(X).*X); % Spectral magnitude in dB

spec = max(spec,-60*ones(1,nfft)); % clip to -60 dB

subplot(2,1,2);

plot(fninf,fftshift(spec),’-’); axis([-0.5,0.5,-60,40]); grid;

title(’Smoothed, Interpolated, Spectral Magnitude (dB)’);

xlabel(’Normalized Frequency (cycles per sample))’);

ylabel(’Magnitude (dB)’);

text(-.6,40,’b)’);

print -deps eps/xw.eps;

DRAFT of “Mathematics of the Discrete Fourier Transform (DFT),” by J.O.
Smith, CCRMA, Stanford, Winter 2002. The latest draft and linked HTML
version are available on-line at http://www-ccrma.stanford.edu/~jos/mdft/.

Page 202

9.1. SPECTRUM ANALYSIS OF A SINUSOID: WINDOWING,

0

100

200

300

400

500

600

−1

−0.5

0

0.5

1

Time (samples)

Amplitude

a)

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

−60

−40

−20

0

20

40

Smoothed, Interpolated, Spectral Magnitude (dB)

Normalized Frequency (cycles per sample))

Magnitude (dB)

b)

Figure 9.6: Eﬀect of the Blackman window on the sinusoidal data
segment.

DRAFT of “Mathematics of the Discrete Fourier Transform (DFT),” by J.O.
Smith, CCRMA, Stanford, Winter 2002. The latest draft and linked HTML
version are available on-line at http://www-ccrma.stanford.edu/~jos/mdft/.

CHAPTER 9. EXAMPLE APPLICATIONS OF THE DFT Page 203

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->