This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 410.80.60.40.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 41.510.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 elementbyelement, 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 π ]642 2 4 610.5 0.5 1 n real Z642 2 4 610.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 oddindexed 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
 Spring '09
 bill lin
 Digital Signal Processing, Multiplication, Signal Processing, Vector Motors, ece101 winter

Click to edit the document details