Test  Status  Code Input and Output 

1  Pass 
x = [1 2 3 4
5 5 6 5
7 9 8 3];
y_correct = [0 0 0 4
0 0 6 0
0 9 0 0];
assert(isequal(your_fcn_name(x),y_correct))
M =
4
I =
4
M =
6
I =
3
M =
9
I =
2

2  Pass 
x = magic(4);
y_correct = [16 0 0 0
0 11 0 0
0 0 0 12
0 0 15 0];
assert(isequal(your_fcn_name(x),y_correct))
M =
16
I =
1
M =
11
I =
2
M =
12
I =
4
M =
15
I =
3

3  Pass 
x = pi;
y_correct = pi;
assert(isequal(your_fcn_name(x),y_correct))
M =
3.1416
I =
1

4  Pass 
x = 0;
y_correct = 0;
assert(isequal(your_fcn_name(x),y_correct))
M =
0
I =
1

5  Pass 
x = toeplitz(1:5);
y_correct = [ 0 0 0 0 5
0 0 0 0 4
3 0 0 0 0
4 0 0 0 0
5 0 0 0 0];
assert(isequal(your_fcn_name(x),y_correct))
M =
5
I =
5
M =
4
I =
5
M =
3
I =
1
M =
4
I =
1
M =
5
I =
1

6  Pass 
x = ones(5);
y_correct = [ 1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0];
assert(isequal(your_fcn_name(x),y_correct))
M =
1
I =
1
M =
1
I =
1
M =
1
I =
1
M =
1
I =
1
M =
1
I =
1

7  Pass 
x =nchoosek(7:9,3);
y_correct =[ 0 0 9];
assert(isequal(your_fcn_name(x),y_correct))
M =
9
I =
3

8  Pass 
x =nchoosek(4:9,2);
y_correct = [ 0 5
0 6
0 7
0 8
0 9
0 6
0 7
0 8
0 9
0 7
0 8
0 9
0 8
0 9
0 9];
assert(isequal(your_fcn_name(x),y_correct))
M =
5
I =
2
M =
6
I =
2
M =
7
I =
2
M =
8
I =
2
M =
9
I =
2
M =
6
I =
2
M =
7
I =
2
M =
8
I =
2
M =
9
I =
2
M =
7
I =
2
M =
8
I =
2
M =
9
I =
2
M =
8
I =
2
M =
9
I =
2
M =
9
I =
2

Return the 3n+1 sequence for n
7041 Solvers
Omit columns averages from a matrix
556 Solvers
1920 Solvers
Create an nbyn null matrix and fill with ones certain positions
189 Solvers
289 Solvers