why setdiff have time longer than for ?
3 views (last 30 days)
Itried to make my code be faster , so i used setdiff instead of a part in my code
*instead of *
*why the running time of this part is less than of setdiff?
Walter Roberson on 12 May 2013
setdiff() essentially has to sort each time -- or at least to check if the set is ordered.
Are the unique_x restricted to being in the allowed range for v, 1:18 ? If so, then how about
buf = 1:10;
buf(unique_x) = ;