Le 10/02/2016 11:02, Samuel Gougeon a écrit :
There is no real Scilab equivalent. Scilab's repmat() could be extended.
For the time being, to process, you may use the 2 following lines:

tmp = [data ; data($, :) .*. ones(addedRows, 1)];
paddedMat = [tmp  tmp(:, $) .*. ones(1,addedCols)];

This workaround works with numerical data (reals, complexes, encoded integers, polynomials).

For boolean data, paddedMat becomes {0|1}. To recover a boolean padded matrix:
paddedMat = (paddedMat==1)

For a matrix of text, repmat() must be used instead of the kronecker product. The following will work whatever is the type of unmixed data, boolean and text included:

tmp = [data ; repmat(data($, :), addedRows, 1)];
paddedMat = [tmp  repmat(tmp(:, $) , 1, addedCols)]

SG

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to