Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Find maximum in matrix and show

1 回表示 (過去 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