Language Reference |
takes the direct product of two matrices
The direct product operator (@) produces a new matrix that is the direct product (also called the Kronecker product) of matrix1 and matrix2, usually denoted by . The number of rows in the new matrix equals the product of the number of rows in matrix1 and the number of rows in matrix2; the number of columns in the new matrix equals the product of the number of columns in matrix1 and the number of columns in matrix2.
For example, the following statements produce the matrix , as shown:
a={1 2, 3 4}; b={0 2}; c=a@b;
C 2 rows 4 cols (numeric) 0 2 0 4 0 6 0 8The following statement produces the matrix , as shown:
d=b@a;
D 2 rows 4 cols (numeric) 0 0 2 4 0 0 6 8
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.