On 12 November 2010 10:00, george.brida <
address@hidden> wrote:
> suppose that we have the following vector u=[10 11 12 14 15 14 10 11
> 12 14 15 17 20 21 20 23]' of length 16. I would like to create the
> following vectors:
> u_1 composed by the elements number 1, 5, 9 and 13 of u
> u_2 composed by the elements number 2, 6, 10 and 14 of u
> u_3 composed by the elements number 3, 7, 11 and 15 of u
> u_4 composed by the elements number 4, 8, 12 and 16 of u
I think you want x = reshape(u,4,4) and then the rows of x will