email@example.com wrote in message <firstname.lastname@example.org>... > Say I have a 1000x10 matrix. The top of the matrix contains noisy data that I want to cut out. From column one I'd like to remove 10 values, from column 2, 15 values, from column 3, 8 values etc. After each column is reduced, I will keep the next 500 entries. So the end matrix will be 500x10. Right now I am doing it one column at a time which I have to put back together. Very tedious.
% Dummy data for test A=rand(1000,10); idxstart=[10 15 8 7 29 14 1 72 4 4]; % index of the start row for each column
[m n]=size(A); B = A(bsxfun(@plus, (0:n-1)*m + idxstart, (0:499)'));