Effacer les filtres
Effacer les filtres

Find index of points between two points?

1 vue (au cours des 30 derniers jours)
Rubel Ahmed
Rubel Ahmed le 12 Nov 2020
Modifié(e) : per isakson le 13 Nov 2020
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));

Réponses (1)

per isakson
per isakson le 13 Nov 2020
Modifié(e) : per isakson le 13 Nov 2020
>> 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

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by