필터 지우기
필터 지우기

how to extract y-values related to x-values?

조회 수: 4 (최근 30일)
Pichawut Manopkawee
Pichawut Manopkawee 2016년 11월 29일
편집: Pichawut Manopkawee 2016년 11월 29일
Hi all,
Do you know how to extract y-values related to x-value? For example, x = [1 2 3 4 5 6 7 8 9 10], y = [9 8 0 3 8 0 9 4 6 3]. And I would like to find y numbers that are related to 3< x <8 (then the result would be 3 8 0 9)
In fact I have lots of data which are not absolutely be easy as example. I need some advice to apply for my own work. Do you have any commandd or stepd how to get that y-numbers?
Thanks in advance, Pich

채택된 답변

KSSV
KSSV 2016년 11월 29일
x = [1 2 3 4 5 6 7 8 9 10] ;
y = [9 8 0 3 8 0 9 4 6 3] ;
iwant = y(x >3 & x <8) ;
  댓글 수: 1
Pichawut Manopkawee
Pichawut Manopkawee 2016년 11월 29일
편집: Pichawut Manopkawee 2016년 11월 29일
Thanks KSSV. The answer you gave me is excellent.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by