matlab code to find the position of values in a vector within the specified range that meets a certain condition?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
pavan sunder
am 28 Nov. 2016
Beantwortet: Preethi
am 28 Nov. 2016
how to find the index positions of values in a vector within the specified range that meets a certain condition?
ex: d=[1 2 14 20 10 15 2 4 9 7 5]
my range(index positions) is 3 to 6
condition is(value < 15)
the output should be [3 5]
0 Kommentare
Akzeptierte Antwort
Preethi
am 28 Nov. 2016
hi,
d=[1 2 14 20 10 15 2 4 9 7 5];
x =find(d<15)
y =x(x<=6 & x>=3)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Elementary Math finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!