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

basic code question

Asked by John on 22 Mar 2012

Hello,

Say I have a vector 'data' with 2 columns.

What would be the code to set x = to the first column and y equal to the second column?

Kind Regards

John

0 Comments

John

Tags

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 22 Mar 2012
Accepted answer
x = data(:,1);
y = data(:,2);

0 Comments

Walter Roberson

Contact us