Find index of points between two points?

조회 수: 2 (최근 30일)
Rubel Ahmed
Rubel Ahmed 2020년 11월 12일
편집: per isakson 2020년 11월 13일
Hi all,
I have an Array A
A =[1,2,5,8,4,7,6,3,12].
I want to find the index of those elements which grater than element 5 and less than 7.
I am writting like this but failed to get solution.
Y_min=5;
Y_max=7;
idx = find((A>Y_min) && (A<Y_max));

답변 (1개)

per isakson
per isakson 2020년 11월 13일
편집: per isakson 2020년 11월 13일
>> A =[1,2,5,8,4,7,6,3,12];
>> Y_min=5;
>> Y_max=7;
>> idx = find((A>Y_min) & (A<Y_max));
>> idx
idx =
7

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by