E7+Discussion+2010-06-25

E7+Discussion+2010-06-25 - Friday, June 25, 2010 E7...

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

View Full Document Right Arrow Icon
Friday, June 25, 2010 E7 DISCUSSION SECTION
Background image of page 1

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

View Full DocumentRight Arrow Icon
Lab Assignment 3 Download additional PDF file from bSpace Contains material for Problems 9 and 10 Updated instructions for Problems 9 and 10 r Still looking for PlotNumbers.m for Problem 11(e). r Turn your written work into the lab GSI by 3pm on Wednesday.
Background image of page 2
Switch Statements switch   switch_expr case   case_expr statement; ... statement; case  {  case_expr1 case_expr2 case_expr3 , . .. } ... otherwise ... end switch_expr must be a scalar or a string. r Executes the first case where switch_expr  ==  case_expr  or where switch_expr is in the cell of case expressions. r If no case matches, the otherwise block will run. r Only one case will run, unlike C, C++, and Java.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Switch Statement Example switch  myLetter case  { ’a’ , ’e’ , ’i’ , ’o’ , ’u’ } disp( ’My letter is a vowel’ ); case  { ’q’ , ’x’ , ’z’ } disp( ’My letter is an interesting consonant’ ) case   ’x’ disp( ’My letter is x’ ) otherwise disp(
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/14/2010 for the course E 7 taught by Professor Patzek during the Summer '08 term at University of California, Berkeley.

Page1 / 12

E7+Discussion+2010-06-25 - Friday, June 25, 2010 E7...

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

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