Programming Previous page   Next Page

Vectors

Matrices with one dimension equal to one and the other greater than one are called vectors. Here is an example of a numeric vector:

You can construct a vector out of other vectors, as long as the critical dimensions agree. All components of a row vector must be scalars or other row vectors. Similarly, all components of a column vector must be scalars or other column vectors:

Concatenating an empty matrix to a vector has no effect on the resulting vector. The empty matrix is ignored in this case:

Use the isvector function to tell if a variable holds a vector:


Previous page  Scalars Full and Sparse Matrices Next page

© 1994-2005 The MathWorks, Inc.