This question is closed. Reopen it to edit or answer.
Is there a way for creating n number of new rows from one row?
1 view (last 30 days)
Ahmet Cecen on 19 May 2016
Edited: Ahmet Cecen on 19 May 2016
A much more robust version of that reference answer, especially if you need to repeat every row the same amount of times, and you have a lot of rows:
b = repmat(a',[4,1]);
c = reshape(b,[4,8])';
b = repmat(a',[numberoftimestorepeat,1]);
c = reshape(b,[size(a,2),size(a,1)*numberoftimestorepeat])'