Problem 44326. Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones
Solution Stats
Problem Comments
-
1 Comment
goc3
on 15 Sep 2017
Please improve the test suite. There is only one test case—three is a recommended minimum, though more may be necessary to completely and adequately test what is being asked.
Solution Comments
Show commentsProblem Recent Solvers136
Suggested Problems
-
All your base are belong to us
561 Solvers
-
Arrange vector in ascending order
798 Solvers
-
Sum the numbers on the main diagonal
599 Solvers
-
Create an index-powered vector
877 Solvers
-
Make an identity matrix whose diagonal elements are 1:n
118 Solvers
More from this Author18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!