31January08 - Ex. color=; switch color case red disp(color...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1/31/08 Announcements: Read Chapter 5 HW1 due 2/7 TA hours Tonight Sriram 4-7pm 1370cs Yadi 1-4pm 5304cs Decisions If statements Ex. if x>0 disp(“x is positive”) elseif x<0 disp(“x is negative”) else disp(“x is zero”) end Selection Used to test a value and from that choose from one of many actions.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ex. color=; switch color case red disp(color is red); case green disp(color is green); otherwise disp(); end For loops do fixed number of repetitions. While loops keep working until a condition is met....
View Full Document

This note was uploaded on 03/31/2008 for the course MATH 340 taught by Professor Meyer during the Spring '08 term at Wisconsin.

Ask a homework question - tutors are online