Minimum of a 3X3 matrix

1 次查看(过去 30 天)
Ken
Ken 2016-10-21
编辑: Star Strider 2016-10-21
I am trying to find the min and the indices of the min in a 3X3 matrix. want to use a variation of "find(arr == max(arr));"
Kindly help

采纳的回答

Star Strider
Star Strider 2016-10-21
编辑:Star Strider 2016-10-21
Two possible approaches:
A = rand(3); % Create Data
[Amin,idx] = min(A(:)); % One Option
[r,c] = ind2sub(size(A), idx)
[r,c] = find(A == min(A(:))) % Another Option
Amin = A(r,c)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by