I would like to interweave two vectors in MATLAB. In fact, I\'d actually just like to add a zero between each element, but I figured I\'d ask the question in such a way that
Octave is a free, open source reverse engineering of MatLab where the functionality and language are the same in most cases. However, if you find yourself coding in Octave, you can use the below to interleave two (real valued) row vectors x
and y
:
[x;y](:)'
Caveat: this is Octave code and doesn't work in MatLab.