This preview shows pages 1–3. Sign up to view the full content.

Signals and Systems with MATLAB Computing and Simulink Modeling, Fourth Edition 10 5 Copyright © Orchard Publications The Discrete Fourier Transform (DFT) We observe that these are the same values as in Example 10.1. We will check the answers of Examples 10.1 and 10.2 with MATLAB and Excel. With MATLAB, we use the fft(x) function to compute the DFT, and the ifft(x) function to com- pute the Inverse DFT. xn=[1 2 2 1]; % The discrete time sequence of Example 10.1 Xm=fft(xn) % Compute the FFT of this discrete time sequence Xm = 6.0000 -1.0000-1.0000i 0 -1.0000+1.0000i Xm = [6 1 j 0 1+j]; % The discrete frequency components of Example 10.2 xn=ifft(Xm) % Compute the Inverse FFT xn = 1.0000 2.0000+0.0000i 2.0000 1.0000-0.0000i To use Excel for the computation of the DFT, the Analysis ToolPak must have been installed. If not, it can installed it by clicking Add Ins on the Tools drop menu, and following the instructions on the screen. With Excel’s Fourier Analysis Tool, we get the spreadsheet shown in Figure 10.1. The instruc- tions on how to use it, are given on the spreadsheet. The term is a rotating vector, where the range is divided into equal segments. Therefore, it is convenient to represent it as , that is, we let (10.15) x1 [] 1 4 --X0 X1 j X2 1 () X3 j ++ + {} = 1 4 -- 61 j j 01 1 j + j + 2 = = x2 1 4 1 1 1 + = 1 4 j 1 1 j + 1 + 2 = = x3 1 4 j 1 j + = 1 4 j j 1 j + j + 1 = = e j2 π N 0 θ 2 π ≤≤ 360 N W N W N e π N -------- =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Chapter 10 The DFT and the FFT Algorithm 10 6 Signals and Systems with MATLAB Computing and Simulink Modeling, Fourth Edition Copyright © Orchard Publications Figure 10.1. Using Excel to find the DFT and Inverse DFT and consequently (10.16) Henceforth, the DFT pair will be denoted as (10.17) and (10.18) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ABC D E Input data x(n) are same as in Example 10.1 and are entered in cells A11 through A14 From the Tools drop down menu, we select Data Analysis and from it, Fourier Analysis The Input Range is A11 through A14 (A11:A14) and the Output Range is B11 through B14 (B11:B14) x(n) X(m) 16 2- 1 - i 20 1- 1 + i To obtain the discrete time sequence, we select Inverse from the Fourier Analysis menu Input data are the same as in Example 10.2 The Input Range is A25 through A28 (A25:A28) and the Output Range is B25 through B28 (B25:B28) X(m) x(n) 61 -1-j 2 02 -1+j 1 W N 1 e j2 π N -------- = Xm [] xn () W N mn n0 = N1 = 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}