문제

I have a matrix of size 139 X 143896.

I have to delete 6000 columns from it.

Currently I am using a for loop to do it and it is really slow.

Is there any faster way to do this?

for i=1:length(ind)
   %ind are the indices of the columns to be removed
   col1=ind(i);
   mat(:,col1)=[];
end

Any help is greatly welcome.

도움이 되었습니까?

해결책

Delete them in one go -

mat(:,ind)=[];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top