Hi,
I have a 3×1 array, a = [1 2 3]', and B, a 3×2 matrix.
How can I create C, a 6×2 matrix, whose first row is the same as B and repeated once [a(1)], the second row is the second row of B repeated twice [a(2)], and the third row is the third row of B repeated three times [(a(3)]? I'm trying to use the repelem function but am a bit stuck…Do I have to loop to do this, or is there another way?
Any help would be appreciated. Thx in advance,
DB
Best Answer