Cody

Solution 1605498

Submitted on 10 Aug 2018 by Arthur Dimitri
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x = [1 2 -3 -4 5 6 -7 8 -9 10 11]; n = 6; assert(isequal(Zero_Cross(x),n))

2   Pass
x = [1 2 -3 ]; n = 1; assert(isequal(Zero_Cross(x),n))

3   Pass
x = ones(1,100); n = 0; assert(isequal(Zero_Cross(x),n))

4   Pass
x = [-6.1 -4.2 -1.1 -6 7 -6 -6 -7 -6 -1]; n = 2; assert(isequal(Zero_Cross(x),n))

5   Pass
x = 1 n = 0; assert(isequal(Zero_Cross(x),n))

x = 1

6   Pass
x = ones(1,50) - 25; n = 0; assert(isequal(Zero_Cross(x),n))

7   Pass
x = 1:50 - 25; n = 0; assert(isequal(Zero_Cross(x),n))

8   Pass
x = [ones(1,50); -ones(1,50)]; x = reshape(x,[1,100]); n = 99; assert(isequal(Zero_Cross(x),n))

Suggested Problems

More from this Author21