How to get one vector from several matrices?

1 view (last 30 days)
Hi; I have matrix and vector and I want to put them in one vector;
For example
A=[1,2;3,4]; B=[5,6];C=[7;8];
I want them in one vector
S=[1,2,3,4,5,6,7,8] Thanks in advance

Accepted Answer

Stephen23
Stephen23 on 1 Jan 2016
Edited: Stephen23 on 1 Jan 2016
S = [reshape(A.',[],1);B(:);C(:)].';

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!