Suppose I have a vector vec with the length will be an odd number.
Then I have another vector vec1 with the length is also odd and less than the length of vec.
I want to put the elements of vec1 into vec that starts at the center of vec and go to both sides from the center.
I'm looking for a general format in case when the length is much more larger !!!
How can I do that?
Ex: This is just an example when length(vec) is 5. I know vec(2:4) = vec1
I'm looking for a general format in case when the length is much more larger !!!
vec = 0 0 0 0 0 vec1 = 1 1 1 new_vec = 0 1 1 1 0
Thank you!
Best Answer