How to make a signal vector?

14 views (last 30 days)
Harini on 4 Apr 2013
I have a basic question in Matlab. Iknow it will be too trivial for most of you, but I just started coding in MATLAB.
S1 and S2 are two signals. I know how to code these. Next I have to make a vector S = [S1 S2]. How do I do this? Suppose S1 and S2 both have 40 samples of data, writing S = [S1 S2] gives me a row vect or of 80 columns, which is not what I want. I want S(n) = [S1(n) S2(n)]. How do I do that? My Ultimate aim is to make a Vector S(dimension Lx1) of source signals and then multiply it with another Matrix(NxL)to get a vector Nx1. Please help ASAP. A lot needs to be done after this basic baby step!! Basically I don't know how to make a signal vector!

Accepted Answer

ChristianW on 4 Apr 2013
S = [S1;S2]
ChristianW on 4 Apr 2013
Edited: ChristianW on 4 Apr 2013
You can transpose S for column wise signal channels.
S = [S1;S2].';

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!