This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 EE102 Systems and Signals Fall Quarter 2011 Jin Hyung Lee Matlab Assignment 1 Getting Started Matlab For this lab we only need the basic abilities of matlab to create and manipulate vectors, and plot the results. The documentation for matlab exists in many places, including the book that comes with student matlab, the online help (the question mark on the user interface), and the Mathworks web site. A document called ”Matlab Getting Started” is also posted on EEWEB for your reference. Preparing Your Lab Report Your lab report will consist of a record of the matlab commands, matlab responses, and the plots you generate. To save a copy of your matlab interaction, type >> diary lab1task1.txt This will save everything you type, and all of matlab responses. To add comments, use a % sign at the beginning of the line. >> % This is a comment If you want to stop recording while you try something out, type >> diary off and then, when you want to start recording again, >> diary on Finally, when you are done, you can edit the diary file in your favorite text editor to add com ments, or eliminate the text from when you asked for ”help”, or forgot a semicolon, and printed the entire array. For each task below, the diary file should only contain a few lines. For the report, submit the (cleaned up) diary file, and the plots that go with it. Matlab Plotting Basics One of the simplest uses of matlab is as a graphing calculator. We’ll go over a simple plotting example. Suppose we want to make plots of the waveforms w ( t ) = e t , x ( t ) = te t and y ( t ) = e t + te t from t = 0 to t = 10 . We want to plot them on both separate and common axes. We follow these steps: 1. Create a time vector: >>t=0:.1:10; 2 This creates a vector, with name t , whose elements range from to 10 in intervals of . 1 ....
View
Full
Document
This note was uploaded on 03/30/2012 for the course ELEC ENGR 102 taught by Professor Lee during the Fall '11 term at UCLA.
 Fall '11
 lee

Click to edit the document details