Info

此问题已关闭。 请重新打开它进行编辑或回答。

Find maximum in matrix and show

2 次查看(过去 30 天)
martin martin
martin martin 2019-6-16
关闭: MATLAB Answer Bot 2021-8-20
Hello guys,
I would have a question - If I have a matrix of numbers for example 50x50 (rows, columns) and matrix changes values for example 50 times - how can I plot position of these 50 maximums?
Thanks for some ideas

回答(1 个)

Star Strider
Star Strider 2019-6-16
If I understand correctly what you want to do, use the max (link) function.
To get the maximum of every column of your matrix ‘M’:
colmax = max(M);
To get the maximum of every row:
rowmax = max(M,[],2);

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by