My question is also about this subject, but appears a bit more complicated. I also need to insert new rows into a matrix (it's a vector column actually), but in different positions. Let's see: I have this column vector for instance:
what I need is to insert new elements in different places. As you can see, the values 4 5 6 7, 11 12 13 and 15 are missing in specific positions. In position 4 I need to insert 4 values (4 5 6 7), in position 7 I need to insert (11 12 13) and in position 8 I need to insert (15).
I used the function diff in order to calculate the difference in the "leaps" and I got somthing like this (11511421) I thought of using a loop for ----- for diff~=1 but after that I got stuck I didn't know to follow.
I would really thank to any who would give me an answer back. I'm waiting for any light!!