필터 지우기
필터 지우기

How to read a single column for specific data?

조회 수: 3 (최근 30일)
Ara
Ara 2012년 12월 31일
Hi,
How can I read this column just for specific data?
x=[1;2;3;4;5;6;7;8;9;10];
I just want to read 1,2,3 and 9, 10 and calculate some formula just for these data.
Could you please guide me how?

채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 31일
How do you know which data you want to "read"? Is it the 1st, 2nd, 3rd, 9th and 10th positions? If so then
x([1 2 3 9 10])
  댓글 수: 5
Walter Roberson
Walter Roberson 2012년 12월 31일
data(data(:,1) < 10 | data(:,1) >= 22, :)
Ara
Ara 2012년 12월 31일
Thank you, walter. Happy New Year!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by