From: fabio freschi on
I am not sure about what you mean with making the matrix smaller, but

idx = find(A);
[i,j,k] = ind2sub(size(A),idx);

extracts the indices of nonzeros of matrix A
Fabio
From: Michael on
I used

Matrix(~any(Matrix')',:) = [];

for a two-dimensional n x 3 array successfully. Maybe you can adjust it to your case.