Gnu Octave, Get every nth row of a matrix/vector:
X = [1;2;3;4;5;6;7;8;9;10;11]
ix = ( 5 : 5 : size(X,1) )
prints:
ix =
5 10
Now, remove rows from the original matrix which will give you a list of the rows not extracted.
Example, remove row 5 and 10 from X:
X([5,10],:) = []
Prints X with 5 and 10 missing:
X =
1
2
3
4
6
7
8
9
11
So that proves concept. Use your ix variable to do it on the specified columns:
X(ix,:) = []
That will make X a list of the rows that have not been extracted. If you need to not disturb the original, make a copy of X and put it into another variable before you do this. Then assign X_2 = X;
Source:
Remove a column from a matrix in GNU Octave