it is really a mental challenge
I don't understand why the size of this code is so huge, can anyone help ?
Hi all,
I have used regular expressions in other languages before but not in MATLAB. Can someone explain the solution to me? I have looked up the format of regexp in the help file, but the use of the regexp in the solution does not seem to fit the description in help.
When I try and run the code in Octave it falls over with an error as it does not recognise the with an 'Invalid call to regexp' error.
Can someone please help!
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 1;
f = 1;
assert(isequal(fib(n),f))
|
2 | Pass |
%%
n = 6;
f = 8;
assert(isequal(fib(n),f))
|
3 | Pass |
%%
n = 10;
f = 55;
assert(isequal(fib(n),f))
|
4 | Pass |
%%
n = 20;
f = 6765;
assert(isequal(fib(n),f))
|
19338 Solvers
962 Solvers
Get the elements of diagonal and antidiagonal for any m-by-n matrix
268 Solvers
283 Solvers
443 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!