Cody

Solution 1973403

Submitted on 13 Oct 2019 by Corban Swain
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
f= @(x) x+1; g= @(x) x/2; h= @(x) x^2; x1 = 8 ; x2 = 10; x3=1; y1 = 33; y2 = 51; y3=1.5; y=compose3(f,g,h); assert(isequal(y(x1),y1)) assert(isequal(y(x2),y2)) assert(isequal(y(x3),y3))

2   Pass
f= @(x) log(x); g= @(x) x+6; h= @(x) x/2; x1 = 8 ; x2 = 4.4; x3 = 6; y1 = 2.3026; y2 = 2.1041; y3=2.1972; y=compose3(f,g,h); assert(abs(y(x1)-y1)<=1e-4) assert(abs(y(x2)-y2)<=1e-4) assert(abs(y(x3)-y3)<=1e-4)

Suggested Problems

More from this Author1