CS 1112 Lecture Notes - Lecture 13: Multiplication Operator
Document Summary
Memory: memory within a system is limited, this can lead to errors in calculation. Vectorized operations: most built in functions are automatically vectorized, summation: x + y is valid if x and y are vectors. Both vectors must have the same size and shape. Output is a vector: multiplication operator: . No change in + and : exception to vectors must be the same size and shape: one vector could be of size 1. Has both rows and columns: matrixname(r, c) is the value at row r and column c, must be rectangular. Each row has the same number of columns. Each column has the same number of rows: built in functions: ones, zeroes, rand still work for matrices, manually creating a matrix [4 0 3; 5 1 9] Second row: 5 1 9: the built in function size(matrixname) gives [numberofrows, numberofcolumns] as output numberofcolumns] as output. Minimum value in a matrix minimumvalue = matrixname(1, 1)