Problem 42672. Longest Sequence of NaNs
In an array return the length of longest sequence of nans for each column.
x =
[ 2 3 1 2 5 6;
nan nan 5 nan 6 -9;
5 nan 8 nan 6 5;
8 nan 7 -5 5.8 5;
nan 0 0 nan 5 7;
nan 5 9 nan 7 nan;
nan nan 10 0 nan 6;
nan nan 0 1 nan 9]
y_correct =
[ 4 3 0 2 2 1]
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
LY Cao
on 24 Oct 2015
First test case is invalid. Please fix it.
Mehmet OZC
on 24 Oct 2015
I have fixed it.
LY Cao
on 24 Oct 2015
and the fourth...
Mehmet OZC
on 24 Oct 2015
It must be OK now!
Solution Comments
Show commentsProblem Recent Solvers64
Suggested Problems
-
Back to basics 25 - Valid variable names
327 Solvers
-
Find the maximum number of decimal places in a set of numbers
2965 Solvers
-
Change the sign of even index entries of the reversed vector
566 Solvers
-
Remove entire row and column in the matrix containing the input values
384 Solvers
-
98 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!