Problem 2803. Split up vector or matrix delimited by NaNs
The problem suite doesn't function properly. The following statement is the culprit:
assert(isequal(c = split_nan_delimited(x), y_correct))
and can be changed to:
for all the test cases.
Furthermore, do not test for emptiness with isequal. Use isempty instead. There are many ways to generate empty cell arrays and matrices in Matlab, none of which are equal with isequal.
Doh! Embarrassing copy paste error. I hope it's all fixed now.
Test 10 still test for emptiness with isequal.
Test suite has been updated to include row vectors as test cases as well.
Solution CommentsShow comments
Problem Recent Solvers7
Test if a Number is a Palindrome without using any String Operations
Compute a dot product of two vectors x and y
solve for y that is half as much as three less than one tenth of x
Return fibonacci sequence do not use loop and condition version 2
More from this Author5
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!