Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
noOp = @(x)x;
fh2 = iterate_fcn(noOp, 50);
assert(isequal(fh2(pi),pi));
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In iterate_fcn (line 2)
In ScoringEngineTestPoint1 (line 2)
In solutionTest (line 3)]
|
2 | Pass |
addOne = @(x)x+1;
addTen = iterate_fcn(addOne, 10);
assert(isequal(addTen(3),13));
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In iterate_fcn (line 2)
In ScoringEngineTestPoint2 (line 2)
In solutionTest (line 5)]
|
3 | Pass |
addOne = @(x)x+1;
addOne2 = iterate_fcn(addOne, 1);
assert(isequal(addOne2(3),4));
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In iterate_fcn (line 2)
In ScoringEngineTestPoint3 (line 2)
In solutionTest (line 7)]
|
4 | Pass |
squarer = @(a) a^2;
fh2 = iterate_fcn(squarer, 3);
assert(isequal(fh2(3),6561));
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In iterate_fcn (line 2)
In ScoringEngineTestPoint4 (line 2)
In solutionTest (line 9)]
|
5 | Pass |
fh = @(y)sqrt(y+1);
fh2 = iterate_fcn(fh,30);
assert(abs(fh2(1) - (1+sqrt(5))/2) < 100*eps);
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In iterate_fcn (line 2)
In ScoringEngineTestPoint5 (line 2)
In solutionTest (line 11)]
|
Remove the polynomials that have positive real elements of their roots.
629 Solvers
151 Solvers
Project Euler: Problem 3, Largest prime factor
379 Solvers
694 Solvers
07 - Common functions and indexing 1
338 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!