I'm having trouble understanding how to do a perfect shuffle of a vector. I'm supposed to split the vector in half then the 1st element is the 1st element in the first half and the 2nd element is the 1st element of the 2nd half, and so on.(adsbygoogle = window.adsbygoogle || []).push({});

For example, if I have [1 2 3 4 5 6]

then I need to rearrange it into [1 4 2 5 3 6]

Can someone at least help me with the pseudo-code? I been thinking about this a few days with no luck. I am only allowed a few functions like "find" or "length". Nothing complex.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Rearranging vectors Matlab

**Physics Forums | Science Articles, Homework Help, Discussion**