Lesson 8: Vector functions


Other MATLAB functions operate essentially on a vector (row or column), but act on an m × n matrix in a column-by-column fashion to produce a row vector containing the results of their application to each column. Row-by-row action can be obtained by using transpose. For example, mean(A')'. A few of these functions are:
   max		sum		median		any
   min		prod		mean		all
   sort				std

For example, the maximum entry in a matrix A is given by max(max(A)) rather than max(A). Try it!