Next: Matrix functions Up: No Title Previous: Scalar functions

Vector functions

Other MATLAB functions operate essentially on a vector (row or column), but act on an m-by-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 the 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.

Wed Mar 13 19:15:55 MET 1996