Pregunta

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.

¿Fue útil?

Solución

Delete them in one go -

mat(:,ind)=[];
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top