MATLAB: Reshaping

reshaping

i have A= 1 0 1 0 0 0 1 and B= 1 1 1 0 0 0 1 now i need to make it as s= 1 1 0 1 1 1 0 0 0 0 0 0 1 1 can any please help me

Best Answer

A = [1 0 1 0 0 0 1];
B = [1 1 1 0 0 0 1];
s = reshape([A;B],1,[])