Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
filetext = fileread('eyeSquared.m');
assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')
|
2 | Pass |
n = 0;
I_correct = [];
assert(isequal(eyeSquared(n),I_correct))
|
3 | Pass |
n = 1;
I_correct = 1;
assert(isequal(eyeSquared(n),I_correct))
|
4 | Pass |
n = 4;
I_correct = [1 0; 0 1];
assert(isequal(eyeSquared(n),I_correct))
|
5 | Pass |
n = 9;
I_correct = [1 0 0; 0 1 0; 0 0 1];
assert(isequal(eyeSquared(n),I_correct))
|
6 | Pass |
n = -9;
I_correct = [];
assert(isequal(eyeSquared(n),I_correct))
|
7 | Pass |
n = 10;
I_correct = [];
assert(isequal(eyeSquared(n),I_correct))
|
8 | Pass |
n = 4.1;
I_correct = [];
assert(isequal(eyeSquared(n),I_correct))
|
Sum all integers from 1 to 2^n
8414 Solvers
Who knows the last digit of pi?
557 Solvers
Reverse the elements of an array
687 Solvers
The sum of the numbers in the vector
426 Solvers
241 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!