Sep 15, 2015

Lecture 7

Using if/else and switch cases

Practicing:


Context example: buying gas using switch cases





























Practical exercises (the comment/section title shows what we are practicing)





I've already used if/else and switch case before in previous classes. It was nice to see the difference between using the find() function and using if/else and switch case. I'll begrudgingly admit that the find() function is way easier to use in MATLAB.