Pergunta

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.

Foi útil?

Solução

Delete them in one go -

mat(:,ind)=[];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top