Matlab_HW2_Solutions_WebPost

Matlab_HW2_Solutions_WebPost - Eng101W07 Sec 100 Homework 2...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Eng101W07 Sec 100 Homework 2 Due Friday, January 19, 2007, by 6 PM EST Upload to CTools Site Name: FILL-IN Lab GSI: FILL-IN Lab Section #: FILL-IN A. Preparatory work . Were consolidating what weve covered over the first four lectures, so, you shouldnt 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 element-by-element 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, 0-degree phase, and a frequency of 200 Hz. Assume that the sampling frequency is 22050 Hz....
View Full Document

Page1 / 8

Matlab_HW2_Solutions_WebPost - Eng101W07 Sec 100 Homework 2...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online