Currently, I have column vectors of different lengths, and I want to insert another column vector at different points in the original array. that is, I want to add my new array to the beginning of the old array, skip 10 places, add a new array again, skip 10 more spaces and add a new array again and so on to the end of the array. I can do this using:
OffsetSign = [1:30]';
Extra = [0;0;0;0;0];
OffsetSign =[Extra;OffsetSign(1:10);Extra;OffsetSign(11:20);Extra;OffsetSign(21:30)];
However, this is not suitable for longer arrays. Any tips on an easy way to do this for longer arrays?
source
share