Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
f{1}=@(x) x^2;
f{2}=@(x) x+3;
f{3}=@(x) x/2;
g=cf(f);
x=[1 2 3];
y_correct = [2 3.5 6];
assert(isequal(g(x),y_correct))
|
2 | Fail |
f{1}=@(x) x^0.5;
f{2}=@(x) x-1;
f{3}=@(x) x^2;
f{4}=@(x) x/3;
g=cf(f);
x=[ 16 49 100];
y_correct = [3 12 27];
assert(isequal(g(x),y_correct))
|
2261 Solvers
Test if a Number is a Palindrome without using any String Operations
181 Solvers
74 Solvers
Back to basics 13 - Input variables
233 Solvers
2457 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!