Cody

Solution 1740614

Submitted on 2 Mar 2019 by Martin C.
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
x = 0; y_correct = 1; assert(abs(my_func(x)-y_correct)<0.0001)

p = 0.0000 0 -0.0000 0 0.0000 0 -0.0000 0 0.0000 0 -0.0014 0 0.0417 0 -0.5000 0 1.0000 y = 1

2   Pass
x = pi/2; y_correct = 0; assert(abs(my_func(x)-y_correct)<0.0001)

p = 0.0000 0 -0.0000 0 0.0000 0 -0.0000 0 0.0000 0 -0.0014 0 0.0417 0 -0.5000 0 1.0000 y = 7.7205e-13

3   Pass
x = rand(1)*2*pi; y_correct = cos(x); assert(abs(my_func(x)-y_correct)<0.0001)

p = 0.0000 0 -0.0000 0 0.0000 0 -0.0000 0 0.0000 0 -0.0014 0 0.0417 0 -0.5000 0 1.0000 y = -0.2386

4   Pass
assessFunctionAbsence({'sin','cos'}, 'FileName', 'my_func.m')