ENGR 132 - QUIZ5

ENGR 132 - QUIZ5 - Thurs/Tues 9:30-11:30 4/24/11 Quiz 5 1....

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style 4/24/11 ENGR 132 Wed/Fri 3:30-5:30
Background image of page 1

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

View Full DocumentRight Arrow Icon
4/24/11 Quiz 5 1) Evaluate the following conditional statements given, a = 1 b = 5 c = 1 a) xor(a~=b, a==c) c) (a>b)|(~((a+c)==(b-3)))|(b>= 22
Background image of page 2
4/24/11 Solution >> a=1; >> b=5; >> c=1; >> answer1 = xor(a~=b, a==c) answer1 = 0 answer2 = 0 +2 +2 +4 (0|~(1)|0)=0 +2 (1<=2)=1
Background image of page 3

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

View Full DocumentRight Arrow Icon
Click to edit Master subtitle style 4/24/11 ENGR 132
Background image of page 4
Background image of page 5

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

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

Unformatted text preview: Thurs/Tues 9:30-11:30 4/24/11 Quiz 5 1. What is output to the command window if the following script file is run in Matlab? List the variables that exist in the workspace. 2. If U = [1 -2 3 -4], V = [1 3 0 -2], give the 55 x=5; temp=55; if temp &gt; 60 x=1 elseif temp &lt; 40 x=3 else x=2 end 4/24/11 Solution 1. x=2 two variables exist in the workspace temp x 2. a) [1 0 1 0] + 4 + 1 + 1 +2 +2...
View Full Document

Page1 / 6

ENGR 132 - QUIZ5 - Thurs/Tues 9:30-11:30 4/24/11 Quiz 5 1....

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