findNearest algorithm

버전 1.7.0.0 (1.35 KB) 작성자: Alexander Wallar
This algorithm sees if data you are searching for is in x and if not it shows the closest value
다운로드 수: 985
업데이트 날짜: 2011/1/18

라이선스 보기

This is a search algorithm but what makes it different is that it checks if the data you are looking for in the data matrix. if it is, it returns the position of it and the value at that position. if what you are searching for is not in the data matrix, the algorithm will return the closest value to what you are searching and return the value and its position inside the matrix

ex:
>>findNearest([1 2 3 4 5],3.6)
ans =
Nearest Value = 4
Position = 4

Acknowledgement:
MIT opencourseware homework assignment but no code was given just the idea.

인용 양식

Alexander Wallar (2024). findNearest algorithm (https://www.mathworks.com/matlabcentral/fileexchange/30029-findnearest-algorithm), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.7.0.0

more improvements

1.1.0.0

ALL THE IMPROVEMENTS EVERYBODY WANTS

1.0.0.0