Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1;
y_correct = 1;
assert(isequal(SeidelEntringerArnold(n),y_correct))
|
2 | Pass |
n = 3;
y_correct = [1 1 0];
assert(isequal(SeidelEntringerArnold(n),y_correct))
|
3 | Pass |
n = 5;
y_correct = [5 5 4 2 0];
assert(isequal(SeidelEntringerArnold(n),y_correct))
|
4 | Pass |
n = 8;
y_correct = [0 61 122 178 224 256 272 272];
assert(isequal(SeidelEntringerArnold(n),y_correct))
|
5 | Pass |
n = 13;
y_correct = [2702765 2702765 2652244 2551202 2401024 2204480 1965664 1689872 1383424 1053440 707584 353792 0];
assert(isequal(SeidelEntringerArnold(n),y_correct))
|
6 | Pass |
n = 10;
y = SeidelEntringerArnold(n);
s = sum(y);
v = round(var(y));
d = y([4 6 9]) - y([2 5 7]);
s_correct = 50521;
v_correct = 8277369;
d_correct = [2709 1024 816];
assert(isequal(s,s_correct) && isequal(v,v_correct) && isequal(d,d_correct))
|
9831 Solvers
707 Solvers
Back to basics 12 - Input Arguments
525 Solvers
Back to basics 23 - Triangular matrix
634 Solvers
139 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!