Find the largest element and its location in a 3 dimensional array

2 次查看(过去 30 天)
How to find the largest element and its location in case of a 3 dimensional array in Matlab?

采纳的回答

Walter Roberson
Walter Roberson 2021-8-8
编辑:Walter Roberson 2021-8-8
[largest_value, idx] = max(YourArray, [], 'all', 'linear');
[row, col, page] = ind2sub(size(YourArray), idx);
In older releases you would probably use
[largest_value, idx] = max(YourArray(:));
[row, col, page] = ind2sub(size(YourArray), idx);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by