There are several ways to locate and remove nans in a matrix, and return an 1d row vector.
In this problem the challenge is to do it within a set time as measured by tic-toc.
The problem will be run numerous times and an average time tested.
Note: I noticed a rare failure depending on when I ran the testsuite, so you might have to resubmit your code if it runs faster on your machine than the limit set here.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers45
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3072 Solvers
-
All your base are belong to us
581 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3734 Solvers
-
Return the first and last characters of a character array
12435 Solvers
-
283 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!