I would like to access vector elements like this:
a_new = [a(1:10) a(21:30) a(41:50) ... ]
Is there any elegant way how to do that without loops?
The vector is huge, so something like
k=[];n=10;for i=1:floor(length(a)/n) if mod(i,2)==0 kk=((i-1)*n):((i)*n); k=[k kk]; end;end;a_new=a(k);
cannot be used.
Thanks, Michal
Best Answer