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 - The Fusion of Science and Community**

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

# Rearranging vectors Matlab

Loading...

Similar Threads - Rearranging vectors Matlab | Date |
---|---|

MATLAB vector multiplication | Aug 28, 2017 |

Matlab A Q on multiplying two vectors | Mar 25, 2017 |

New to Matlab, help with vectors | Feb 20, 2016 |

How to add normal vectors/quivers to sphere in matlab? | Dec 20, 2015 |

Extract and rearrange data in Matlab | May 10, 2013 |

**Physics Forums - The Fusion of Science and Community**