Midterm 1 Practice Problems - University of California,...

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

View Full Document Right Arrow Icon
University of California, Berkeley College of Engineering Fall Semester 2005 Professor R. Dibble and R. Horowitz E77 Midterm Examination I Monday September 26, 2005 Name : SID : Section: 12 (Please circle your lecture section) Please circle your Laboratory section: (where your exam will be returned) #11: TuTh 8-10 #12: TuTh 10-12 #13: TuTh 12-2 #14: TuTh 2-4 #15: TuTh 4-6 #16: MW 8-10 #17: MW 10-12 #18: MW 2-4 #19: MW 4-6 Part Points Grade 1 10 2 14 3 12 4 14 5 8 6 4 7 10 8 8 TOTAL 80 1. Write your name on each page. 2. Record your answers ONLY on the spaces provided. 3. You may not ask questions during the examination. 4. You may not leave the room before the exam ends. 5. Close book exam. One 8 . 5 × 11 sheet of handwritten notes allowed. 6. No calculators or cell phones allowed. (Please turn cell phones o±) 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
E77 Midterm I, Fall 2005 NAME: 1 Part What is the output when the following commands are typed in sequence from the MATLAB command window? Do not worry about the exact format of the output. 1. (2) >> clear all >> x = 4*2/4+(-2)ˆ2; >> x = 2. (2) >> y = 4*(2\4)-2ˆ(2); >> y = 3. (2) >> y = floor(3.2)+log(exp(2)); >> y = 4. (2) >> z =5*sin(pi/2)+sqrt(9); >> z = 5. (2) >> who Numbers between parenthesis are the points allocated to each question. page 2/10
Background image of page 2
E77 Midterm I, Fall 2005 NAME: 2 Part Assume that the following commands have been entered into the MATLAB command window: >> clear all > >a=2 ; >> b = [1;4]; >> c= [1 2]; Write the output that the following commands will produce. Do not worry about the exact format of the output. If the result produces a Matlab error then write ERROR. 1. (2) > >a+b ans = 2. (2) > >a. *c ans = 3. (2) > >a*c ans = 4. (2) > >c. ˆa ans = 5. (2) > >b+c ans = 6. (2) >> b’ + c ans = 7. (2) >> c .ˆ (b’) ans = Numbers between parenthesis are the points allocated to each question. page 3/10 This material has not yet been covered in F'07
Background image of page 3

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

View Full DocumentRight Arrow Icon
E77 Midterm I, Fall 2005 NAME: 3 Part 1. What is the output when the following commands are sequentially typed from the MATLAB command window? Do not worry about the exact format of the output. (a) (1) >> s = ’Are you asleep yet?’; >> length(s) = (b) (2) >> s([5 7 14]) = (c) (3) > > s ( 1 6:- 3:9 ) = 2. Fill in the blanks, exactly as you would in Matlab, to create two vectors, V and W , each having 101 elements and ranging from π/ 2to 2. (3) >> V = linspace( ); (3) >> W = [ : : ]; Numbers between parenthesis are the points allocated to each question. page 4/10
Background image of page 4
E77 Midterm I, Fall 2005 NAME: 4 Part Assume that the matrix A = 165 429 807 has been defned, i.e. >>A = [1 6 5; 4 2 9; 8 0 7]; . Write the output that the ±ollowing commands will produce. Do not worry about the exact ±ormat o± the output. I± the result produces a Matlab error then write ERROR.
Background image of page 5

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

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

This note was uploaded on 11/01/2009 for the course ENGLISH 7 taught by Professor Sengupta during the Spring '09 term at University of California, Berkeley.

Page1 / 22

Midterm 1 Practice Problems - University of California,...

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

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