Low level NaN - MATLAB Cody - MATLAB Central

Problem 42481. Low level NaN

Difficulty:Rate
  • I have a dataset. Columns represents different variables.
  • A variable may start with NaN or any double type number.
  • If it starts with double number it continues with double type numbers.
  • If it starts with NaN, we do not know when it ends.
  • Return the row index where last NaN is observed in overall dataset. (Think column-wise)
Input
[ 1 NaN 5 NaN 2
2 NaN 4 4 8
6 NaN 8 2 4
0 0 0 0 0]
should return 3 because last NaN is observed in third row.
Test suite may be changed!

Solution Stats

76.4% Correct | 23.6% Incorrect
Last Solution submitted on May 07, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers64

Suggested Problems

More from this Author92

Problem Tags

nan

Community Treasure Hunt

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

Start Hunting!
Go to top of page