{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 1 solution

# Lab 1 solution - ECE 101 Linear Systems Winter 2009 Lab 1...

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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 101 - Linear Systems, Winter 2009 Lab # 1 Solutions (send comments/questions to [email protected]) Problem 1 The plot for the message is shown below: 0.5 1 1.5 2 2.5 x 10 4-1-0.8-0.6-0.4-0.2 0.2 0.4 0.6 0.8 1 x amplitude I got a bad feeling about this! Problem 2 The plot for the message is shown below: 1 2 3 4 5 6 x 10 4-1.5-1-0.5 0.5 1 1.5 x amplitude I find your lack of faith disturbing. The multiply should be done with an array multiplication. The vectors C and K need to be multiplied element-by-element, which is array multiplication (.*). Matrix multiplication (*) would result in a dot product, i.e., a single number. 1 Problem 3 ((1 + j 7)(3 + j 2)) / ((2 + j 5)(1- j 5)) =- . 5464 + 0 . 7507 j = 0 . 9285 exp (2 . 2 j ) Problem 4 See Matlab code for problem 4. Problem 5 Z = r ( n ) exp( jn ) where r ( n ) = tanh ( n ), and n ∈ [- 2 π, 2 π ]-6-4-2 2 4 6-1-0.5 0.5 1 n real Z-6-4-2 2 4 6-1-0.5 0.5 1 n imaginary Z Problem 6 (Solution provided by Prof. Siegel) For the half and twice functions, loops can be avoided by using the colon operator (:), along with the end keyword. For example, given a vector X , one can obtain only the odd-indexed elements by using X (1 : 2 : end). This command says to take the vector X , start at the first element (indexed by 1), go to the end of the vector, and take every 2 elements. Thus, Matlab will select elements 1, 3, 5, up to the end of the vector X. In Matlab, loops are slower than using the colon operator for matrix and vector manipulations, so...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

Lab 1 solution - ECE 101 Linear Systems Winter 2009 Lab 1...

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

View Full Document
Ask a homework question - tutors are online