Hi guys!
I have a sequence of numbers which I want to assign to another sequence of numbers:
numbers=1:40;numbers_b=[11:14, 21:24, 31:34, 41:44, 51:54, 61:64, 71:74, 81:84, 91:94, 101:104];assigned=[numbers; numbers_b]'assigned = 1 11 2 12 3 13 4 14 5 21 6 22 7 23 8 24 9 31 10 32 11 33 12 34 13 41 14 42 15 43 16 44 17 51 18 52 19 53 20 54 21 61 22 62 23 63 24 64 25 71 26 72 27 73 28 74 29 81 30 82 31 83 32 84 33 91 34 92 35 93 36 94 37 101 38 102 39 103 40 104
Now I want these assignments to be fixed. I have a certain sequence of numbers_b (second column) and I'd like to have a column with the corresponding numbers of numbers (first column).
Example: My sequence starts with 82 11 23 53 82 …..
That would mean I get 30 1 7 19 30 …..
Furthermore, my sequence contains 160 numbers of numbers_b.
Does anybody know how that could be done?
Thanks in advance!
R
Best Answer