Cody

Solution 2104612

Submitted on 24 Jan 2020
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
a = 3; b = 4; c = 5; y_correct = 2.4; assert(isequal(triangle_height(a, b, c), y_correct));

Undefined function 'arctan' for input arguments of type 'double'. Error in triangle_height (line 2) theta = arctan(b/a) Error in Test1 (line 6) assert(isequal(triangle_height(a, b, c), y_correct));

2   Fail
a = 1; b = 2; c = 3; y_correct = NaN; assert(isequaln(triangle_height(a, b, c), y_correct));

Undefined function 'arctan' for input arguments of type 'double'. Error in triangle_height (line 2) theta = arctan(b/a) Error in Test2 (line 6) assert(isequaln(triangle_height(a, b, c), y_correct));

3   Fail
a = 0; b = 1; c = 1; y_correct = NaN; assert(isequaln(triangle_height(a, b, c), y_correct));

Undefined function 'arctan' for input arguments of type 'double'. Error in triangle_height (line 2) theta = arctan(b/a) Error in Test3 (line 6) assert(isequaln(triangle_height(a, b, c), y_correct));

4   Fail
a = -3; b = -4; c = -5; y_correct = NaN; assert(isequaln(triangle_height(a, b, c), y_correct));

Undefined function 'arctan' for input arguments of type 'double'. Error in triangle_height (line 2) theta = arctan(b/a) Error in Test4 (line 6) assert(isequaln(triangle_height(a, b, c), y_correct));