Replace all odd numbers in the vector or matrix with NaN. For example, if

 x = [1 3 4 5 8 11];

then return

 y = [NaN NaN 4 NaN 8 Nan];

Solution Stats

142 Solutions

81 Solvers

Last Solution submitted on Dec 16, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers81

Suggested Problems

More from this Author7

Problem Tags

Community Treasure Hunt

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

Start Hunting!