Cody

Solution 1004592

Submitted on 10 Oct 2016
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
filetext = fileread('TANGENT.m'); assert(isempty(strfind(filetext, 'tan')),'tan() forbidden') assert(isempty(strfind(filetext, 'cos')),'cos() forbidden')

Error using fileread (line 22) Could not open file TANGENT.m. No such file or directory. Error in Test1 (line 1) filetext = fileread('TANGENT.m');

2   Fail
x = 0; y_correct = 0; assert(abs(TANGENT(x)-y_correct)<0.01)

Undefined function 'TANGENT' for input arguments of type 'double'. Error in Test2 (line 3) assert(abs(TANGENT(x)-y_correct)<0.01)

3   Fail
x = pi/4; y_correct = 1; assert(abs(TANGENT(x)-y_correct)<0.01)

Undefined function 'TANGENT' for input arguments of type 'double'. Error in Test3 (line 3) assert(abs(TANGENT(x)-y_correct)<0.01)

4   Fail
x = -pi/4; y_correct = -1; assert(abs(TANGENT(x)-y_correct)<0.01)

Undefined function 'TANGENT' for input arguments of type 'double'. Error in Test4 (line 3) assert(abs(TANGENT(x)-y_correct)<0.01)