From: Maxx Chatsko on
Hello all,
If I had a 20 by X array and wanted to transfer 3 out of every 4 rows into another array, how would I do that with indexing? (skip every fourth row for a total of 15 rows in the new array).
Thanks
Maxx
From: Andy on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i2jur1$og9$1(a)fred.mathworks.com>...
> Hello all,
> If I had a 20 by X array and wanted to transfer 3 out of every 4 rows into another array, how would I do that with indexing? (skip every fourth row for a total of 15 rows in the new array).
> Thanks
> Maxx

A=rand(20,5);
B=A;
B(4:4:end,:)=[];
From: us on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i2jur1$og9$1(a)fred.mathworks.com>...
> Hello all,
> If I had a 20 by X array and wanted to transfer 3 out of every 4 rows into another array, how would I do that with indexing? (skip every fourth row for a total of 15 rows in the new array).
> Thanks
> Maxx

do you ever bother to follow up your old OPs...

http://www.mathworks.com/matlabcentral/newsreader/view_thread/286704#762010

us