Understanding the Interactive Matrix Language

Numeric Literals

Matrix literals with multiple elements have the elements enclosed in braces. Use commas to separate the rows of a matrix. For example, the following statement assigns a row vector to the matrix x:

  
    x={1 2 3 4 5 6};
 
Here is the resulting matrix:
  
               X 
               1         2         3         4         5         6
 
The following statement assigns a column vector to the matrix y:
  
    y={1,2,3,4,5};
 
Here is the resulting matrix:
  
                                      Y 
                                      1 
                                      2 
                                      3 
                                      4 
                                      5
 
The following statement assigns a 3 x 2 matrix literal to the matrix z:
  
    z={1 2, 3 4, 5 6};
 
Here is the resulting matrix:
  
                                Z 
                                1         2 
                                3         4 
                                5         6
 
The following statement creates a matrix w that is three times the matrix z:
  
    w=3#z;
 
Here is the resulting matrix:
  
                                   W 
                                   3         6 
                                   9        12 
                                  15        18
 

Previous Page | Next Page | Top of Page