Write code which replaces the number 1 with two NaNs.

Example

 X = [ 1   2   NaN   4   1   3   7   NaN   1   4   NaN   2]

Answer Y is

     [ NaN  NaN  2  NaN   4   NaN  NaN   3   7   NaN  NaN  NaN  4   NaN  2]

Solution Stats

517 Solutions

199 Solvers

Last Solution submitted on Dec 07, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers199

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!