Finding a value, index which lies between 2 points in an array
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yash Runwal
am 10 Sep. 2020
Kommentiert: Yash Runwal
am 10 Sep. 2020
Hello fellow MATLAB users,
I am currently writing a MATLAB function for which I need some help.
For example:
I have an array and a value:
X = [0, 10, 20];
value = 17;
I need to find the indices of the X in which the value lies:
Here the answer will be X[2] and X[3].
But I am not sure how to do this. I would really appreciate any help I can get.
Thank You.
0 Kommentare
Akzeptierte Antwort
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!