Cody

Problem 17. Find all elements less than 0 or greater than 10 and replace them with NaN

Created by Cody Team in Cody Challenge

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.

Example:

 Input  x =  [  5  17 -20  99  3.4  2  8  -6 ]
 Output y is [  5 NaN NaN NaN  3.4  2  8 NaN ]

Solution Stats

41.91% Correct | 58.09% Incorrect
Last solution submitted on Oct 20, 2018

Problem Comments

Solution Comments

Recent Solvers10182

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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!