{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

matlab_tutorial_one

# matlab_tutorial_one - ECE 561 Digital Communications...

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

ECE 561 – Digital Communications Systems MATLAB Tutorial #1 Assignments in this course contain problems that must be completed using MATLAB. A minimal knowledge of MATLAB is required to get started. Advanced MATLAB features will be introduced in tutorials posted on the homework web page. Students who have not used MATLAB before should go to the following web page: http://www.mathworks.com/academia/student_center/tutorials/launchpad.html View the “Getting Started” and “MATLAB Examples” videos for an overview. Then proceed to the Interactive MATLAB Tutorials and view “Navigating the MATLAB Desktop” and “MATLAB Fundamentals.” You may need to return to these tutorials periodically throughout the semester. Throughout this course we will need to display waveforms in both the time and the frequency domain. This tutorial will introduce some of the tools available to do that with in MATLAB. The Discrete Fourier Transform (DFT) The Discrete Fourier Transform (DFT) takes a discrete signal in the time domain and transforms that signal into its discrete frequency domain representation. This transform is generally the one used in DSP systems. The theory behind the DFT is covered in the discrete time linear systems course. In that course you will find that the DFT of a signal can be used to approximate the continuous time Fourier transform. The Fast Fourier Transform (FFT) Depending on the length of the sequence being transformed with the DFT the computation of this transform can be time consuming. The Fast Fourier Transform (FFT) is an algorithm for computing the DFT of a sequence in a more efficient manner. MATLAB provides a built in command for computing the FFT of a sequence. In this section we will discuss the use of the FFT to approximate the Fourier transform of signals. Recall that the DFT and FFT are discrete frequency domain representations of a

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

View Full Document
In our examples, these sequences will be obtained by sampling continuous time signals. In general, if a continuous time function, x(t), is sampled every T s seconds until N samples are collected, the DFT/FFT of this sequence is also of length N. The components of the resulting transform correspond to frequencies spaced every 1/(N*T s ) Hz. For a 100 Hz sinusoid: x(t) = cos(200 π t) we can produce a sequence of samples of length N = 2048 spaced every T s = .001 in MATLAB using: >> clear >> ts=.001; >> t=0:ts:2047*ts; >> x=cos(200*pi*t); >> plot(t,x) resulting in the following plot (note that the time axis has been reduced): We can find the amplitude spectrum of this signal using the fft command. The resulting transform will contain N = 2048 values. Since the frequency components are spaced every 1/(N*T s ) Hz these correspond to frequency values from 0 to (N-1)/(N*T s ) Hz as shown below. >> N=length(x);
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 14

matlab_tutorial_one - ECE 561 Digital Communications...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online