I have a repetition vector x = [3 2 1 2] and set of unique values y = [1 2 3 4]; How can I generate a vector z such that x = histc(z,y);
In this case z would be [1 1 1 2 2 3 4 4]
Thanks in advance!
KL
generate arrayhistogramrun length encoding
Best Answer