I want to rearrange a vector A= [1,2,3]' to a vector B=[1,1,2,2,3,3]
Here is what i tried so far:
A = [1,2,3]';for i = 1:size(A,1) B(i,:)=[A(i) ; A(i)];endB=B
Which outputs a not quite right answer…:
B = 1 1 2 2 3 3
Any help is aprriciated..
Jens
Best Answer