basic code question

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

 채택된 답변

Walter Roberson
Walter Roberson 2012년 3월 22일

0 개 추천

x = data(:,1);
y = data(:,2);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

질문:

2012년 3월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by