<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 10/02/2016 11:02, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:56BB0AC1.5030909@free.fr" type="cite">There is
no real Scilab equivalent. Scilab's repmat() could be extended.
<br>
For the time being, to process, you may use the 2 following lines:
<br>
<br>
tmp = [data ; data($, :) .*. ones(addedRows, 1)];
<br>
paddedMat = [tmp tmp(:, $) .*. ones(1,addedCols)];
<br>
</blockquote>
<br>
This workaround works with numerical data (reals, complexes, encoded
integers, polynomials).<br>
<br>
For boolean data, paddedMat becomes {0|1}. To recover a boolean
padded matrix:<br>
paddedMat = (paddedMat==1)<br>
<br>
For a matrix of text, repmat() must be used instead of the kronecker
product.<br>
The following will work whatever is the type of unmixed data,
boolean and text included:<br>
<br>
<font color="#993399"><tt>tmp = [data ; repmat(data($, :),
addedRows, 1)]; </tt><tt><br>
</tt><tt>
paddedMat = [tmp repmat(tmp(:, $) , 1, addedCols)]</tt><tt><br>
</tt><tt>
</tt></font><br>
SG<br>
<br>
</body>
</html>