hi,
the running time of the following code is very long:
%%%%%%%%%%%%%%
for i=1:p count=0; for j=1:p if mat(i,2)~=0 if mat(i,2)==mat(j,2) mat(i,2)=0; mat2(i,2)=i; count=count+1; x(i)=count; end end endend%%%%%%%%%%%%%
where p=211000
are there anyway to make it faster?
thanks in advance
Best Answer