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

New to MATLAB?

X = [X1 X2]; - Please Explain

Asked by Ananth

Ananth (view profile)

on 12 Jan 2013

I am beginner of Matlab, Please explain the following line. X = [X1 X2];

1 Comment

Jan Simon

Jan Simon (view profile)

on 12 Jan 2013

The forum is not the right place to explain the basics. The Getting Started chapters of the documentation explain them exhaustively and therefore it is strongly recommended to read them carefully.

Ananth

Ananth (view profile)

Products

No products are associated with this question.

2 Answers

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 12 Jan 2013
Edited by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 12 Jan 2013
X1=12
X2=24
X = [X1 X2]  % create a line vector X by horizontal concatenation;
Y=[X1;X2]    %vertical concatenation

You have to read this

http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab

0 Comments

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Answer by Walter Roberson

Walter Roberson (view profile)

on 12 Jan 2013

0 Comments

Walter Roberson

Walter Roberson (view profile)

Contact us