MATLAB: Horzcat different size rows; zero padding

horzcat; zero padding

Hi,
I have 6 matrices; all are 7 columns. The number of rows is 12, 14, 16, 17, 17, 17. I want to pick off the first row from each and put them into one matrix.
I create a matrix of zeros that is the final size I need of (17,7), but when I run the following I get a 'CAT arguments dimensions are not consistent'.
A = zeros(17,7);
A = [B(:,1) C(:,1) D(:,1) E(:,1) F(:,1) G(:,1)];
The problem is that the first row does not keep the trailing zeros after the 12 cells are filled with the data. I don't understand why this happens. How can I concatenate these rows?
Thank you!

Best Answer

Preallocating A is useless here, because the 2nd line does not write into A, but overwrites A:
A = zeros(17,7); % Useless
A = [B(:,1) C(:,1) D(:,1) E(:,1) F(:,1) G(:,1)]; % Error!
Matt's solution works fine, but is not comfortable. Have you seen FEX: PADCAT? It pads the vectors with NaN's but they can replaced easily afterwards:
A(isnan(A)) = 0;