ECE 101 lab_solution1

ECE 101 lab_solution1 - ECE 101 Linear Systems, Winter 2008...

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

View Full Document Right Arrow Icon
ECE 101 – Linear Systems, Winter 2008 Lab #1 Solutions January 17, 2008 (send questions/comments to [email protected]) Problem 1 . The plot for the message is shown below: Problem 2 . The plot for the message is shown below: The multiply should be done with an array multiplication. The vectors ( M -9000) and ( K + C ) need to be multiplied element-by-element, which is array multiplication ( .* ). Matrix multiplication ( * ) would result in a dot product, i.e., a single number.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 3 . ((2 + j5) (1 - j5)) / ((1 + j7) (3 + j2)) = –0.634 – 0.871j = 1.077e -2.200j Problem 4 . z = r(n)e jn where r(n) = 1 – sin(n), n [0, 2 π ]. The plot below shows the real and imaginary parts on separate axes: The plot can also be done in the complex plane: Problem 5 . 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
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/16/2009 for the course ECE 101 taught by Professor Siegel during the Fall '08 term at UCSD.

Page1 / 4

ECE 101 lab_solution1 - ECE 101 Linear Systems, Winter 2008...

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