I'd like to extract elements from a vector using the :
-operator, but periodically. As an example, say a={1,2,3, ..., 10}
and that I would like to extract elements in steps of 2, changing the reference. Then I would like to get
ref 1: 1 3 5 7 9
ref 2: 2 4 6 8 10
ref 3: 3 5 7 9 1
...
Is there a keyword in MATLAB to force it to be periodic? Or do I have to apply circshift
to the array first, and then extract?