Binary Search for numeric vector
버전 1.1.0.0 (2.5 KB) 작성자:
Dr. Murtaza Ali Khan
Search given value in a sorted vector, returns the index of location where the value is found.
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.
인용 양식
Dr. Murtaza Ali Khan (2025). Binary Search for numeric vector (https://www.mathworks.com/matlabcentral/fileexchange/11287-binary-search-for-numeric-vector), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
개발 환경:
R14SP2
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
Help Center 및 MATLAB Answers에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
태그
도움
도움 받은 파일: Binary Search
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!