フィルターのクリア

Info

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

I have to find the maximum element in a two dimensional array and replace it with 0.

1 回表示 (過去 30 日間)
Bryce Imbriale
Bryce Imbriale 2018 年 9 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I don't even know where to start. I am also given an example: given array=[1 2 4 5; 8 -7 5 3; 12 45 1 6], after applying your scripts, array==[1 2 4 5; 8 -7 5 3; 12 0 1 6].

回答 (1 件)

ANKUR KUMAR
ANKUR KUMAR 2018 年 9 月 28 日
A=randi(10,5,6)
A(A==max(A(:)))=0
  1 件のコメント
Walter Roberson
Walter Roberson 2018 年 9 月 28 日
A question not answered in the specifications is what to do if there are multiple copies of the maximum.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by