<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Courier New"><br>
Dear all,<br>
<br>
I need to zero-pad the columns of an N-D array x to a length N.
I've found the following solution: <br>
<br>
siz = size(x);<br>
a = repmat(0,[N, siz(2:$)]); // Create array of 0's whose
columns have length N<br>
// and the remaining dimensions
are the same as in x<br>
a(1:siz(1), :) = x; // Replace non-padding 0's by x
<br>
<br>
This seems to work. However, I'm concerned about the use of the
last : as a replacemant for all the remaining dimensions, since I
couldn't find it documented. Is it an intended behviour?<br>
<br>
Regards,<br>
<br>
Federico Miyara </font>
</body>
</html>