Make visible max values - MATLAB Cody - MATLAB Central

Problem 42630. Make visible max values

Difficulty:Rate

Make visible maximum values of rows

 input = [1 2 3 4 5;
          6 9 8 2 1;
          2 1 4 5 8;
          1 9 7 9 2];
 output = [0 0 0 0 5;
           0 9 0 0 0;
           0 0 0 0 8;
           0 9 0 9 0];

I prefer solutions without for/while loops

Solution Stats

47.93% Correct | 52.07% Incorrect
Last Solution submitted on Jan 01, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
1
3

Problem Recent Solvers44

Suggested Problems

More from this Author92

Problem Tags

Community Treasure Hunt

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

Start Hunting!