Generate a NaN...on purpose - MATLAB Cody - MATLAB Central

Problem 1406. Generate a NaN...on purpose

Difficulty:Rate

The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many different ways this can be done, so be creative and submit more than one solution if you have lots of ideas!

Solution Stats

59.01% Correct | 40.99% Incorrect
Last Solution submitted on Jun 19, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers316

Suggested Problems

More from this Author4

Problem Tags

nan

Community Treasure Hunt

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

Start Hunting!