Matrix Manipulation - MATLAB Cody - MATLAB Central

Problem 44031. Matrix Manipulation

Difficulty:Rate

Given an m*n matrix, see if a matrix contains any 0s in any row. if it contains 0 anywhere in any particular row, delete that row and fill that row with random integer values between 3 to 15. For example: mat = [3 2 1 3; 3 0 0 1; 0 4 3 1]; answer = [3 2 1 3; 4 7 5 12; 4 9 10 14]

Solution Stats

56.94% Correct | 43.06% Incorrect
Last Solution submitted on Jan 22, 2025

Problem Comments

Solution Comments

Show comments
Who Deserves Your Praise? Discover the New Contribution Widget!
...
We are excited to announce another update to our Discussions area: the...

Problem Recent Solvers36

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page