Getting Started Previous page   Next Page

Working with Matrices

This section introduces you to other ways of creating matrices:

Generating Matrices

MATLAB provides four functions that generate basic matrices.

zeros
All zeros
ones
All ones
rand
Uniformly distributed random elements
randn     
Normally distributed random elements

Here are some examples:


Previous page  Examples of Expressions The load Function Next page

© 1994-2005 The MathWorks, Inc.