CTU: EE 343 – Signals and Systems: Lab 1: Continuous and Discrete Time Signals in MATLAB                                  ...
CTU: EE 343 – Signals and Systems: Lab 1: Continuous and Discrete Time Signals in MATLAB                                  ...
Upcoming SlideShare
Loading in...5
×

Ee343 signals and systems - lab 1 - loren schwappach

691

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
691
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Ee343 signals and systems - lab 1 - loren schwappach"

  1. 1. CTU: EE 343 – Signals and Systems: Lab 1: Continuous and Discrete Time Signals in MATLAB 1 Colorado Technical University EE 343 – Signals and Systems Lab 1: Continuous and Discrete Time Signals May 2010 Loren Schwappach ABSTRACT: This lab report was completed as a course requirement to obtain full course credit in EE343, Signalsand Systems at Colorado Technical University. This lab report examines the basic operations of MATLAB via the creation ofseveral continuous-time and discrete-time signals. If you have any questions or concerns in regards to this laboratoryassignment, this laboratory report, the process used in designing the indicated circuitry, or the final conclusions andrecommendations derived, please send an email to LSchwappach@yahoo.com. All computer drawn figures and pictures usedin this report are of original and authentic content. III. RESULTS I. INTRODUCTION For the discrete-time function: , the MATLAB is a powerful program and is useful in the following code was input into MATLAB:visualization of mathematics, physics, and appliedengineering. In this lab exercise MATLAB will be used to %Setup a matrix of discrete values ones and zeros.compute and visualize discrete-time and continuous-time %The graph starts at t=1 so four zeros are required.signals. >> stepfn =[zeros(1,4),ones(1,5)] stepfn = 0 0 0 0 1 1 1 1 1 %Multiply all values by 4. II. PROCEDURES >> Y = 4*stepfn This lab begins with the creation of the discrete-time Y=step function: 0 0 0 0 4 4 4 4 4 >> stem(Y) To create this discrete time function in MATLAB,individual values are defined at each time and inserted into aMATLAB array. These values used must be numerous enoughto efficiently describe the function with great accuracy, andfor our first function, 9 values were placed within an array. The second objective of this lab is to develop andplot the continuous-time sinusoidal function: To create this function in MATLAB a variable name iscreated and equated to the function. In the above case thefunction y[t] is a combination of two added cosine functions. The final objective of this lab is to develop a discrete-time representation of the continuous-time functionmentioned previously. Figure 1: Discrete-time step function As can be seen by figure 1, the function is a discrete- time representation of a step function with a height of 4.
  2. 2. CTU: EE 343 – Signals and Systems: Lab 1: Continuous and Discrete Time Signals in MATLAB 2 For the continuous-time function: IV. EVALUATION , the following MATLAB code . Developing the continuous-time and discrete-timewas used. signals in MATLAB was an easy task and no difficulties were encountered. I was able to plot multiple cosine functions>> t = 0:.00001:.1; within the same graph as shown in figure 2. All plots were>> w0 = 2*pi; smooth and easy to manipulate.>> Y1 = (cos(w0*50*t));>> Y2 = 2*cos(w0*100*t);>> Y = Y1 + Y2; V. CONCLUSIONS>> plot(t,Y1,--, t,Y2,:, t,Y,-); . MATLAB is a great utility for representing complex concepts visually and can easily be manipulated to show signals in various formats. This lab project was successful in demonstrating MATLABs powerful features in a quick and easy method. REFERENCES [1] Haykin, S., “Signals and Systems 2nd Edition” McGraw- Hill, New York, NY, 2007. Figure 2: Continuous-time functions Finally, the continuous-time function Y in figure 2above can now be represented in MATLAB by:>> t = 0:.001:.1;>> w0 = 2*pi;>> Y1 = (cos(w0*50*t));>> Y2 = 2*cos(w0*100*t);>> Y = Y1 + Y2;>> stem(t,Y); Figure 3: Discrete-time representation of y[t]

×