In case my variables are in a timeseries format (say 4 timeseries), not a vector anymore,
for example
var1 = [5 6 7 8 9;50 60 70 80 90; 500 600 700 800 900;5000 6000 7000 8000 9000]
var2 = [11 12 13 14 15; 110 120 130 140 150; 1100 1200 1300 1400 1500; 11000 12000 13000 14000 15000]
var3 = [17 18 19 20 21; 170 180 190 200 210; 1700 1800 1900 2000 2100; 17000 18000 19000 20000 21000]
how can I again when the positions vector is [1 1 3 2 2 ]
obtain a final matrix x1, with the same logic as above, where it would have the format
x1 = [5 6 19 14 15; 50 60 190 140 150; 500 600 1900 1400 1500;5000 6000 19000 14000 15000]
??