I have this vector of size like 40000 with values like
12312345 4564 122356 3455 34566
There are like only 200 unique values in this vector. So
The third output of unique will do that for you!
[~,~,NewVector]=unique(Vector)