Cody

# Problem 43294. Can we make a triangle?

Solution 2118979

Submitted on 5 Feb 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
assert(isequal(Is_Triangle(3,4,6),true))

Error using sum Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'. Error in Is_Triangle (line 2) if max([a,b,c])>sum(a,b,c)/2 Error in Test1 (line 1) assert(isequal(Is_Triangle(3,4,6),true))

2   Fail
assert(isequal(Is_Triangle(6,4,3),true))

Error using sum Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'. Error in Is_Triangle (line 2) if max([a,b,c])>sum(a,b,c)/2 Error in Test2 (line 1) assert(isequal(Is_Triangle(6,4,3),true))

3   Fail
assert(isequal(Is_Triangle(3,7,4),false))

Error using sum Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'. Error in Is_Triangle (line 2) if max([a,b,c])>sum(a,b,c)/2 Error in Test3 (line 1) assert(isequal(Is_Triangle(3,7,4),false))

4   Fail
assert(isequal(Is_Triangle(4,3,7),false))

Error using sum Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'. Error in Is_Triangle (line 2) if max([a,b,c])>sum(a,b,c)/2 Error in Test4 (line 1) assert(isequal(Is_Triangle(4,3,7),false))

5   Fail
assert(isequal(Is_Triangle(3,3,4),true))

Error using sum Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'. Error in Is_Triangle (line 2) if max([a,b,c])>sum(a,b,c)/2 Error in Test5 (line 1) assert(isequal(Is_Triangle(3,3,4),true))