Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert vector to matrix matlab

Status
Not open for further replies.

newbie193

Electrical
Jul 2, 2013
2
hi

I am a newbie to programming.

i have 12 vectors of size 1*150 (1 row 150 columns)

i want to merge all these 12 vectors to a matrix of size 12 *150
(12 row 150 columns)

how should i do it?
all vectors are of same size 1* 150 andAll of them have to join into a matrix of size 12* 150

say vectors are (A1 A2 ... A12) TO a single matrix A(size 2 * 150)
I AM USING MATLAB
please do help
 
Replies continue below

Recommended for you

the final matrix has to be of size 12* 150 sorry for typo error there
 
A = [A1; A2; A3; A4; A5; A6; A7; A8; A9; A10; A11; A12];

In general, this is far too simple a question to post to a forum. As an electrical engineer, it's surprising to be a "newbie to programming", and is unacceptable to not be able to read the Getting Started chapter of the MATLAB help. Consider the collective time of you posting, everyone reading, and my reply, compared to the gains you would achieve by reading the MATLAB help.
 
Agreed

But also experiment with [A1,A2], [A1',A2'] and [A1';A2'] to give you some idea of how catenation works



Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor