findNlargest
LARGEVALUES = findNlargest(INPUTVALUES, N)
Finds the N largest values in INPUTVALUES and outputs them to LARGEVALUES
[LARGEVALUES, INDEX] = findNlargest(INPUTVALUES, N)
INDEX is the index of the returned values in the original INPUTVALUES
Example:
L = findNlargest([2 7 7 6 -1],3)
L =
6
7
7
Written in c, so the operation is fast. Type "mex findNlargest.c" in matlab before use.
You might need a free compiler if it was not installed with your matlab:
http://www.mathworks.com/support/compilers/R2012b/win64.html
Cite As
Mattias Karlsson (2026). findNlargest (https://uk.mathworks.com/matlabcentral/fileexchange/39877-findnlargest), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Linear Algebra >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
