Cody

Solution 1980119

Submitted on 17 Oct 2019 at 12:23
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   Fail
x = 0; y_correct = 1; assert(abs(my_func(x)-y_correct)<0.0001)

y = 0 ans = -0.9624

Assertion failed.

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

y = NaN ans = -0.7514

Assertion failed.

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

y = NaN ans = 0.4072

Assertion failed.

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

The submission must not contain the following functions or keywords: cos