ENGR 132 - QUIZ6

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

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
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
Image of page 3

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

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

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern