Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
combining two matrices

Subject: combining two matrices

From: sk maidul haque

Date: 31 Dec, 2010 05:10:21

Message: 1 of 3

Given two matrices, say A and B.
A=[1 2
      3 4
      5 6];
B=[7 8
     3 7];
How can I combine these two matrices to get
C=[1 2
3 4
5 6
7 8
3 7];

What command should I use?

Subject: combining two matrices

From: Yumnam Kirani

Date: 31 Dec, 2010 05:21:05

Message: 2 of 3

"sk maidul haque" <skmaidulhaque@gmail.com> wrote in message <ifjojs$c08
You append the matrix B to matrix A using semicolom operator.

Yumnam Kirani Singh
Tronglaobi Awang Leikai

$1@fred.mathworks.com>...
> Given two matrices, say A and B.
> A=[1 2
> 3 4
> 5 6];
> B=[7 8
> 3 7];
> How can I combine these two matrices to get
> C=[1 2
> 3 4
> 5 6
> 7 8
> 3 7];
>
> What command should I use?

Subject: combining two matrices

From: Matt Fig

Date: 31 Dec, 2010 05:50:19

Message: 3 of 3

C = [A;B]

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us