ENGR 132 - QUIZ6

# ENGR 132 - QUIZ6 - ENGR 132 Wed/Fri 3:30-5:30 Click to edit...

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

Click to edit Master subtitle style 4/24/11 ENGR 132 Wed/Fri 3:30-5:30

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

View Full Document
4/24/11 Quiz 6 Write the conditional structure required to determine what region a given point (x and y) is in. The values for x and y are already defined in Matlab and are within the valid region. Store the region in a string variable named R. Example – given x = 0.25 and y= 0.1 22 0 0 .5 0 0 .2 0 .4 0 .6 0 .8 1 x y R E G IO N 2 R E G IO N 1 in c lu d e s re d lin e R E G IO N 3 in c lu d e s b lu e lin e
4/24/11 Solution OR 2 – totally off 4 – some form of if structures 6 – if/elseif/else end but wrong conditional statements 8 – minor mistakes 10 – correct if y <= x R='Region 1' elseif y>=1-x R='Region 3' else R='Region 2' end if y >= 1-x R='Region 3' elseif y <= x R='Region 1' else R='Region 2' end 0 0 .5 0 0 .2 0 .4 0 .6 0 .8 1 x y R E G IO N 2 R E G IO N 1 in c lu d e s re d lin e R E G IO N 3 in c lu d e s b lu e lin e y = 1-x y = x

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

View Full Document
Click to edit Master subtitle style 4/24/11 ENGR 132 Thurs/Tues 9:30-11:30
4/24/11 Quiz 6 The speed limit on I-65 is 70 mph. Write the conditional structure to determine if the value

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern