Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [8 10 9 9 1
8 3 2 4 4
10 4 6 2 7
7 1 6 4 1];
y_correct = [4480 120 648 288 28];
assert(isequal(ProdMat(x),y_correct))
v =
4480
calc =
1
v =
4480 120
calc =
1
v =
4480 120 648
calc =
1
v =
4480 120 648 288
calc =
1
v =
4480 120 648 288 28
calc =
1
|
2 | Pass |
x = [7 4 1 4 5 3 7 5 7
1 6 6 6 9 8 2 2 8
6 7 9 8 4 9 6 7 5
1 2 8 9 3 5 5 7 9];
y_correct = [42 336 432 1728 540 1080 420 490 2520];
assert(isequal(ProdMat(x),y_correct))
v =
42
calc =
1
v =
42 336
calc =
1
v =
42 336 432
calc =
1
v =
42 336 432 1728
calc =
1
v =
42 336 432 1728 540
calc =
1
v =
42 336 432 1728 540 1080
calc =
1
v =
42 336 432 1728 540 1080 420
calc =
1
v =
42 336 432 1728 540 1080 420 490
calc =
1
v =
42 336 432 1728 540 1080 420 490 2520
calc =
1
|
3 | Pass |
filetext = fileread('ProdMat.m');
assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')
|
4 | Pass |
filetext = fileread('ProdMat.m');
assert(isempty(strfind(filetext, 'prod')),'prod() function is forbidden')
|
5 | Pass |
filetext = fileread('ProdMat.m');
assert(isempty(strfind(filetext, '!echo')),'!echo hacks are forbidden')
|
1726 Solvers
1882 Solvers
125 Solvers
156 Solvers
443 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!