Scilab Function replicate - replicate a matrix
with Scilab
Calling Sequence
- [output] = replicate(input1,input2)
Parameters
- input1
: input matrix (before replicating).
- input2
: vector of two elements, how many replications in each dimension; input2(1) represents how many rows of replications; input2(2) represents how many columns of replications.
- output
: output matrix (after replicating).
Description
This function replicates a matrix in both dimensions (after replication input parameter input1 become an element of an input2(1) x input2(2) matrix).
Examples
output1=replicate([1,1,1],[3,2])
output1=[1,1,1,1,1,1,1,1,1;
1,1,1,1,1,1,1,1,1;
1,1,1,1,1,1,1,1,1]
output2=replicate([2,2;2,2],[3,1])
output2=[2,2;
2,2;
2,2;
2,2;
2,2;
2,2]
Author
Created for Scilab by S. Favaro (Email: sfavaro@katamail.com) 20-12-03.