please find below my code:
A=[1 2 3]
B=[4 5 6]
out_weight=zeros(1,2*length(A))
k=1
for i=1:length(A)
out_weight(k)=A(i)
out_weight(k+1)=B(i)
k=k+2
end
Any shorter code i can use?
Info
This question is closed. Reopen it to edit or answer.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!