I got stuck with a (may be) simple problem. Here are two vectors, like:
a = [20 13 24 ...];b = [3 2 4 ...];
How can I create a new vector that contains 3 20s, 2 13s, 4 24s, and so on? (Not using any loop). The output will look like as shown in c:
c = 20 20 20 13 13 24 24 24 24 ...
Best Answer