Skim Chapters 2, 3, & 4 Prior to Attempting

Skim Chapters 2, 3, & 4 Prior to Attempting

<p> ELEC 206 HW #7 Matlab Homework 2 Due: Friday 28 Oct 2011  Skim chapters 2, 3, & 4 prior to attempting. </p><p>Part 1. Simple Script File Create a Script file (M- file) that contains the following code. Run the program by typing the name of the file (no extension) at the matlab command prompt. Don’t worry if some of the commands are still strange to you at this point. Print out both the m- file and the output plots for the report. %Simple script file % My Name 10/8/09 t = linspace(0,1, 501); % 501 pts of ‘t’ f1 = 2*pi * 10; % freq1 = 10 f2 = 2*pi*20; % freq2 = 20 x = cos(f1 .* t); % cosine at freq1 y = sin(f2 .* t); % sine at freq2 subplot(2,1,1) % first of two plots plot(t, x), title(‘cos at f = 10’), xlabel(‘Time(sec)’) % plot, title, and axis label subplot(2,1,2) % second of two plots plot(t,y), title(‘ sin at f = 20’) , xlabel(‘Time(sec)’) % plot, title, and axis label</p><p>Part 2. Build a Script File</p><p>Create a single Script file (M- file) that will generate and plot the functions listed below. Plot both functions on separate plot axes on the same figure window. Use appropriate title and axis labels. Print out the m- file and the output plots for the report. </p><p>1. Plot the function x(t) vs t for -10 <= t <= 10</p><p> x(t) = (3/2)t 2 + 4t - 5</p><p>2. Plot the function r(w) vs w for 0<= w <= 2*pi</p><p> r(w) = 2 sin(2w) + sin(5w) - cos( 2.5 w) </p><p>Part 3. Problem 4.10 of text</p><p>Create a single Script file (M- file) that will complete problem 4.10 of the text.</p><p>Report: 1) A cover sheet with your name. 2) Print out of part 1 m-file and plots 3) Print out of the part 2 m-file and plots. 4) Print out of the part 3 m-file and output.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us