Info
此问题已关闭。 请重新打开它进行编辑或回答。
I have to find the maximum element in a two dimensional array and replace it with 0.
1 次查看(过去 30 天)
显示 更早的评论
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].
2 个评论
Bish Erbas
2018-9-28
Thanks, Walter. Newest questions page is flooded with same user's various other posts.
回答(1 个)
ANKUR KUMAR
2018-9-28
A=randi(10,5,6)
A(A==max(A(:)))=0
1 个评论
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!