N largest values and locations in multidimensional array

Returns the N largest values for a multidimensional array, and their subscripts.
529 téléchargements
Mise à jour 26 nov. 2010

Afficher la licence

For arbitrary sized arrays, it sorts the effective column array and returns the largest n elements. The column index of maximum are converted into subscripts which are returned as rows in array. Option exists to only consider unique values.

Not optimized, but meant to be functional for most cases. Not tested on sparse arrays. Function is just recommended as a handy function to put in your personal toolbox.

To find minimum values, just negate the input dataset and the output values.

Citation pour cette source

Alan Jennings (2024). N largest values and locations in multidimensional array (https://www.mathworks.com/matlabcentral/fileexchange/29543-n-largest-values-and-locations-in-multidimensional-array), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2009a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Operators and Elementary Operations dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0