MATLAB Answers

John

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

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


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today