N largest values and locations in multidimensional array

版本 1.0.0.0 (1.7 KB) 作者: Alan Jennings
Returns the N largest values for a multidimensional array, and their subscripts.
529.0 次下载
更新时间 2010/11/26

查看许可证

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.

引用格式

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. 检索时间: .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0