Language Reference |
creates a new matrix of repeated values
The REPEAT function creates a new matrix by repeating the values of the argument matrix nrow*ncol times, ncol times across the rows, and nrow times down the columns. The matrix argument can be numeric or character. For example, the following statements result in the matrix , repeating the matrix twice down and three times across:
x={ 1 2 , 3 4} ; y=repeat(x,2,3); Y 1 2 1 2 1 2 3 4 3 4 3 4 1 2 1 2 1 2 3 4 3 4 3 4
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.