Cody

Problem 44944. Convert from Fahrenheit to Celsius

Solution 2990428

Submitted on 25 Sep 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
F = [75 82 97 65]; C_correct = [23.8889 27.7778 36.1111 18.3333]; assert(all(abs(temp_convert(F) - C_correct) < 1e-4))

Error in solution: Line: 3 Column: 17 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
F = []; C_correct = []; assert(all(abs(temp_convert(F) - C_correct) < 1e-4))

Error in solution: Line: 3 Column: 17 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

3   Fail
F = [-1; 1200]; C_correct = [-18.3333;648.8889]; assert(all(abs(temp_convert(F) - C_correct) < 1e-4))

Error in solution: Line: 3 Column: 17 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Suggested Problems

More from this Author13

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!