On 2/11/2012 9:43 AM, Milos Milenkovic wrote:
...
> from every matrix on every three columns (matrices are always n*3), I
> have to select first and third and from them to form a separate matrix.
> So if I have matrix of nine columns, the new matrix will be composed
> from 1,3,4,6,7,9 column. Sorry!
I still don't follow the general rule here.
You say a n*3 column matrix (presuming) n=1,2,3,... and want every three
(third?) column. That would be seemingly be x(:,[1:3:end]} which for
n=2 --> [1 4] or n=3 --> [1 4 7] but you throw in 3,6, and 9 as well for
the n=3 case.
What the above looks like is starting w/ 1:2:n except after the first
two you then increment the starting point by one and repeat...
What's actual precise definition of the rule?
--