Repetition of rows of a matrix maintaining the number of columns
1 view (last 30 days)
My case is very similar to this one: http://www.mathworks.es/matlabcentral/answers/7258-pasting-row-elements-as-matrix
I also want to create a new matrix from a previous one (A) such all the elements in the first row are copied with N replications and the same should be done for the next row till I reach last row.
The order of new matrix is also N * [rows(A)*cols(A)]; but in my case its number of rows has to be N*rows(A) and the number of columns has to be the same as the previous (A) matrix.
For example, imagine my A matrix is A=[ 1 2
If I replicate N=2 all the rows, my new A_ matrix should be A_=[1 2
Can you help me, please?
Thanks and regards