Possible Duplicate:
MATLAB: How To Efficiently Remove NaN Elements from Matrix
I got code that does it below but its a little slow (the matrix is big) is there a better way to do it?
errorMat=isnan(rates);
errorRows=ind(errorMat);
for i=1:length(errorRows)
rates(:,errorRows(i)) = [];
end
Alternatively:
I think the second approach is faster.