repmat

  • repmat(X,n) returns a matrix with size(X,1) * n rows and size(X,2) * n columns containing n * n the matrix X
  • repmat(X,n,m) returns a matrix with size(X,1) * n * size(X,2) * m containing n * m the matrix X

Examples

> X = 1:2#

	1            2

> repmat(X,3,1)#

	1            2
	1            2
	1            2

> repmat(X,3,2)#

	1            2            1            2
	1            2            1            2
	1            2            1            2

Resources

See also

reshape