Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s = evalc('type digSpi');
if ~isempty(regexp(s,'error'))
error('error using error');
end
if ~isempty(regexp(s,'assert'))
error('error using assert');
end
if ~isempty(regexp(s,'diag'))
error('error using diag');
end
if ~isempty(regexp(s,'spiral'))
error('error using spiral');
end
if ~isempty(regexp(s,'for'))
error('error using for');
end
if ~isempty(regexp(s,'while'))
error('error using while');
end
|
2 | Pass |
%%
a = diag(spiral(4));
b = digSpi(4);
assert(isequal(a,b));
|
3 | Pass |
%%
a = diag(spiral(5));
b = digSpi(5);
assert(isequal(a,b));
|
4 | Pass |
%%
a = diag(spiral(6));
b = digSpi(6);
assert(isequal(a,b));
|
5 | Pass |
%%
a = diag(spiral(7));
b = digSpi(7);
assert(isequal(a,b));
|
6 | Pass |
%%
a = diag(spiral(8));
b = digSpi(8);
assert(isequal(a,b));
|
Determine whether a vector is monotonically increasing
11917 Solvers
785 Solvers
Find out missing number from a vector of 9 elements
245 Solvers
531 Solvers
224 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!