
2.2 Basic plotting ................................... 14
2.2.1 overview.................................. 14
2.2.2 Creating simple plots . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.3 Adding titles, axis labels, and annotations . . . . . . . . . . . . . . . 15
2.2.4 Multiple data sets in one plot . . . . . . . . . . . . . . . . . . . . . . 16
2.2.5 Specifying line styles and colors . . . . . . . . . . . . . . . . . . . . . 17
2.3 Exercises ...................................... 18
2.4 Introduction .................................... 19
2.5 Matrix generation ................................. 19
2.5.1 Enteringavector ............................. 19
2.5.2 Enteringamatrix............................. 20
2.5.3 Matrixindexing.............................. 21
2.5.4 Colonoperator .............................. 22
2.5.5 Linearspacing............................... 22
2.5.6 Colon operator in a matrix . . . . . . . . . . . . . . . . . . . . . . . . 22
2.5.7 Creating a sub-matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.5.8 Deleting row or column . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.9 Dimension................................. 25
2.5.10 Continuation ............................... 26
2.5.11 Transposing a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.12 Concatenating matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.5.13 Matrixgenerators............................. 27
2.5.14 Specialmatrices.............................. 28
2.6 Exercises ...................................... 29
3Array operations and Linear equations 30
3.1 Array operations ................................. 30
3.1.1 Matrix arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30
3.1.2 Array arithmetic operations . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 Solving linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 Matrixinverse............................... 33
ii