Cody

# Problem 42646. Matrix FUN

Solution 2233602

Submitted on 25 Apr 2020
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
x = 4; y_correct = 0; assert(isequal(mat_fun(x),y_correct))

row = 1 col = 1

Output argument "y" (and maybe others) not assigned during call to "mat_fun". Error in Test1 (line 3) assert(isequal(mat_fun(x),y_correct))

2   Fail
x = [3 2 3 2 5 6 2 1 2]; y_correct = 3; assert(isequal(mat_fun(x),y_correct))

row = 1 col = 9

Unrecognized function or variable 'y'. Error in mat_fun (line 6) y=y+1 Error in Test2 (line 3) assert(isequal(mat_fun(x),y_correct))

3   Fail
x = [999 999 999 2 15 6]; y_correct = 5; assert(isequal(mat_fun(x),y_correct))

row = 1 col = 6

Unrecognized function or variable 'y'. Error in mat_fun (line 6) y=y+1 Error in Test3 (line 3) assert(isequal(mat_fun(x),y_correct))

4   Fail
x = 3:3:999; y_correct = 333; assert(isequal(mat_fun(x),y_correct))

row = 1 col = 333

Unrecognized function or variable 'y'. Error in mat_fun (line 6) y=y+1 Error in Test4 (line 3) assert(isequal(mat_fun(x),y_correct))

5   Fail
x = [1 2 3 4 5 6;6 5 4 3 2 1]; y_correct = 4; assert(isequal(mat_fun(x),y_correct))

row = 2 col = 6

Unrecognized function or variable 'y'. Error in mat_fun (line 6) y=y+1 Error in Test5 (line 3) assert(isequal(mat_fun(x),y_correct))

6   Fail
x = [7 8 11 13 14 17]; y_correct = 0; assert(isequal(mat_fun(x),y_correct))

row = 1 col = 6

Output argument "y" (and maybe others) not assigned during call to "mat_fun". Error in Test6 (line 3) assert(isequal(mat_fun(x),y_correct))