Replace 0 indices in array with 1's - MATLAB Cody - MATLAB Central

Problem 44326. Replace 0 indices in array with 1's

Take a incoming vector, and replace 0's with ones

Solution Stats

74.1% Correct | 25.9% Incorrect
Last Solution submitted on Dec 23, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
12
4

Problem Recent Solvers119

Suggested Problems

More from this Author18

Community Treasure Hunt

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

Start Hunting!
Go to top of page