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

45256 Solutions

15811 Solvers

Last Solution submitted on Jul 19, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers15811

Suggested Problems

More from this Author96

Community Treasure Hunt

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

Start Hunting!