y is a 5000 by 24 matrix. i need a new 46 by 24 matrix such that row 1 of y repeats 23 times and row 2 repeats 23 times. the code is given below
p=1;k=1;a=ones([1,24]);while k<3 sub=y(k,:); k=k+1; while j<24 a(j,:)=sub; j=j+1; endend
the answer i expect is a 46 by 24 matrix. but i get a 23 by 24 matrix.
Best Answer