This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Eng101W07 Sec 100 Homework 2 Due Friday, January 19, 2007, by 6 PM EST Upload to CTools Site Name: FILLIN Lab GSI: FILLIN Lab Section #: FILLIN A. Preparatory work . We’re consolidating what we’ve covered over the first four lectures, so, you shouldn’t have to hold off on completing your homework for additional lecture or lab materials. So, your main task is to review the lecture and lab materials as well as the assigned readings. For additional resources, consult Matlab Help, as indicated in the hints for each problem. B. Answer the following questions. 1. [15 pts. (3+3+3+3+3)] Colon constructions. Using the colon operator, implement each of the following constructions in your Matlab Command Window. Paste both your expression and answer in the space provided. a. The integers from 15 to 9 >> 15:9 ans = 15 14 13 12 11 10 9 b. The interval from 0 to 10 divided into 5 equal parts. >> 0:10/5:10 ans = 0 2 4 6 8 10 c. The sequence of real numbers from 8 to 4 in steps of 0.5. >> 8:0.5:4 ans = Columns 1 through 8 8.0000 7.5000 7.0000 6.5000 6.0000 5.5000 5.0000 4.5000 Column 9 4.0000 d. The sequence of squares of the integers from 0 to 5. >> (0:5).^2 ans = 0 1 4 9 16 25 e. The sum of the elementbyelement product of the integers from 0 to 4 and the integers from 0 to 4. [Hint: use the sum function.] >> sum((0:4).*(4:1:0)) ans = 10 2. [10 pts (3+3+4] For parts a and b, use the Command Window. Include your command window code and a figure of your result. Let your array index be n = 1:200 . a. Plot the first 200 samples of a sinusoid with an amplitude of 5, 0degree phase, and a frequency of 200 Hz. Assume that the sampling frequency is 22050 Hz....
View
Full
Document
This homework help was uploaded on 04/04/2008 for the course ENGR 101 taught by Professor Ringenberg during the Fall '07 term at University of Michigan.
 Fall '07
 Ringenberg

Click to edit the document details