I have a vector X and 5 states (each state is a vector like A B C D E as below).
A = [10 11 12]; B = [20 25]; C = [37 37]; D = [49]; E = [57 51 54];
X = [ 10 11 12 20 25 37 37 49 57 51 54 ….];
[10 11 12] corresponds to A and will be represented as 1 in the resultant vector Z, like that 2 for B 3 for C etc.
How can I obtain Z from X. Here Z will be as below : Z = [1 2 3 4 5 …..];
Best Answer