Introductory Programming Fall 2005 For today, you should have: 1) Read Chapter 4 Today: 1) matrices For next time you should: 1) prepare for a quiz on matrices Evaluation 2 ------------ Generally pretty good. Some people tried to use matrices and got confused. Don't forget assignment statement 101: 1) left side is a variable 2) right side is an expression 3) don't be fooled by the equals sign What's the difference between a statement and an expression? 1) an expression is a combination of operators and operands that has a value. It gets evaluated, but it doesn't _do_ anything. 2) a statement does something; for example, an assignment statement gives a value to a variable. Statements get executed. Some functions are like expressions; they produce a value, but they don't do anything: sin(pi) # computes a value, but has no lasting effect # on the workspace y = sin(pi) # this makes more sense Some functions are like statements; they do something, but they don't have a value. plot(1:10) # a window appears z = plot(1:10) # what is z? Matrices -------- Review of indices and elements. Review of row and column vectors. Review of matrix concatenation! Review of plot.