Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
h = counter;
assert(isequal(h(), 1))
assert(isequal(h(), 2))
assert(isequal(h(), 3))
assert(isequal(h(), 4))
assert(isequal(h(), 5))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
[> In counter at 2
In verifyCode>evaluateCode at 238
In verifyCode at 43
In fevalJSON at 14]
ans =
1
ans =
1
ans =
1
ans =
1
ans =
1
|
2 | Pass |
%%
code = fileread('counter.m');
assert(isempty(strfind(code, 'persistent')));
|
Find the sum of all the numbers of the input vector
31940 Solvers
17209 Solvers
261 Solvers
2240 Solvers
Find the maximum number of decimal places in a set of numbers
734 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!