I have a matrix that I need to shift some rows according to a special number i, for example if i=3 I have to shift all rows from row 3 down because I have to add new elements to that row, so I should shift all the rows after this one (rows 1 and 2 have to stay the same.) for doing this I added a new row to my matrix with all elements of zero, and now I have to shift this row of zeros (which is the last row) to the i'th row. for example:
and I want to add b=[8,8,8] to the third row, so rows: 7,8,9 and 10,11,12 have to shift down. after adding row of zeros:
and then row 0,0,0 should be shifted to the third row which is 7,8,9 and row 7,8,9 should shift to 4th row and so on.. how can I do this in matlab?