Cody

Solution 2104329

Submitted on 24 Jan 2020 at 6:56
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
n = 10; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

Index exceeds the number of array elements (1). Error in zeroToNby2 (line 2) y = n(1:2:n); Error in Test1 (line 3) assert(isequal(zeroToNby2(n),y_correct))

2   Fail
n = 102; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

Index exceeds the number of array elements (1). Error in zeroToNby2 (line 2) y = n(1:2:n); Error in Test2 (line 3) assert(isequal(zeroToNby2(n),y_correct))

3   Fail
n = 73; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

Index exceeds the number of array elements (1). Error in zeroToNby2 (line 2) y = n(1:2:n); Error in Test3 (line 3) assert(isequal(zeroToNby2(n),y_correct))