findNlargest

Finds the N largest values in the input. Very fast.
280 Downloads
Aktualisiert 16. Jan 2013

Lizenz anzeigen

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

Zitieren als

Mattias Karlsson (2024). findNlargest (https://www.mathworks.com/matlabcentral/fileexchange/39877-findnlargest), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

findNlargest/

Version Veröffentlicht Versionshinweise
1.0.0.0