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))
|
2 | Pass |
%%
code = fileread('counter.m');
assert(isempty(strfind(code, 'persistent')));
|
How to find the position of an element in a vector without using the find function
2477 Solvers
284 Solvers
Find nearest prime number less than input number
268 Solvers
250 Solvers
238 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!