Interleave and Deinterleave a vector into two new vectors

前端 未结 4 696
遇见更好的自我
遇见更好的自我 2021-01-16 08:17

Interleaver: Assume we have vector X= randi(1,N) I would like to split the contents of X into two new vectors X1and <

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-16 08:42

    I think it's hard to get a cleaner solution than this:

    x  = 1:20
    x1 = x(1:2:end)
    x2 = x(2:2:end)
    

提交回复
热议问题