Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1048. Detect a number and replace with two NaN's

Created by Praveen Suvarna

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]

Tags

Problem Group

Solution Statistics

96 correct solutions 102 incorrect solutions
Last solution submitted on Dec 11, 2014

Problem Comments

Solution Comments