matlab - Reindexing some values in a vector -
i have vector of size 40000 values like
12312345 4564 122356 3455 34566
there 200 unique values in vector. want replace these big values numbers 1:200
such smallest vector value replaced 1, next smallest 2 , on 200.
how can in matlab?
the third output of unique you!
[~,~,newvector]=unique(vector)
Comments
Post a Comment