You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
INPUT:
x: vector of numeric values, x should already be sorted in ascending order
(e.g. 2,7,20,...120)
sval: numeric value to be search in x
OUTPUT:
index: index of sval with respect to x. If sval is not found in x then index is empty.
Cite As
Dr. Murtaza Ali Khan (2026). Binary Search for numeric vector (https://ch.mathworks.com/matlabcentral/fileexchange/11287-binary-search-for-numeric-vector), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: Binary Search
General Information
- Version 1.1.0.0 (2.5 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
