Previous Page | Next Page

Working with Matrices

More about Missing Values

Missing values in matrices are discussed in Chapter 2. You should read that chapter and Chapter 19 carefully so that you are aware of the way IML treats missing values. Following are several examples that show how IML handles missing values in a matrix.

Consider the following two matrices x and y:

{let } x =   [ 1 & 2 & . \    . & 5 & 6 \    7 & . & 9 \    ]   { and } y =   [ 4 & . & 2 \    2 & 1 & 3 \    6 & . & 5 \    ]
The following statements are true:
x +y { yields }   [ 5 & . & . \    . & 6 & 9 \    13 & . & 14 \    ]   { (matrix addition)}
x \char93  y { yields }   [ 4 & . & . \    . & 5 & 18 \    42 & . & 45 \    ]   { (element multiplication)}
x [+,] { yields }   [ 8 & 7 & 15 \    ]   { (column sums)}

Previous Page | Next Page | Top of Page