You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Cite As
Alan Jennings (2026). 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. Retrieved .
General Information
- Version 1.0.0.0 (1.66 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
