Cody

# Problem 43215. Convert radians to degrees

Solution 2156332

Submitted on 11 Mar 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
x = pi; y_correct = 180; assert(abs(RAD2DEG(x)-y_correct)<0.01)

Error in solution: Line: 2 Column: 12 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

2   Fail
x = -pi; y_correct = -180; assert(abs(RAD2DEG(x)-y_correct)<0.01)

Error in solution: Line: 2 Column: 12 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

3   Fail
x = pi/2; y_correct = 90; assert(abs(RAD2DEG(x)-y_correct)<0.01)

Error in solution: Line: 2 Column: 12 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.

4   Fail
x = pi/4; y_correct = 45; assert(abs(RAD2DEG(x)-y_correct)<0.01)

Error in solution: Line: 2 Column: 12 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.