Document Summary
We introduced the basics of programming in matlab. Matlab is a language for modelling and when it is wrong it is interpreted one statement at a time. It is a pretty good first programming language because it gives us quite informative error messages when we make a mistake. We learned about the basics of variables, expressions, and assignment. We learned about control constructs such as if-statements, for-loops, while-loops, and switch-statements. We learned about logical operators that go with these. We learned about different types such as numbers, characters, and logical values. We learned about 1 dimensional arrays (vectors) and two-dimensional arrays. We learned how to define functions as self-contained blocks of code with a name. We learned how to get values into functions with parameters and get values out with return values. We saw how to call functions in matlab. We did a larger assignment to test our programming skills.