findNsmallest

Finds the N smallest values in the input. Very fast.
237 Downloads
Aktualisiert 7. Jan 2013

Lizenz anzeigen

Example:
x = findNsmallest( [4 4 10 5 3 8], 3)

x =
4 4 3

Written in c, so the operation is fast. Type "mex findNSmallest.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). findNsmallest (https://www.mathworks.com/matlabcentral/fileexchange/39727-findnsmallest), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2012b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Matrix Indexing 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!

findNsmallest/

Version Veröffentlicht Versionshinweise
1.1.0.0

Added example to description

1.0.0.0