Cody

Problem 42445. Converter temp 0 to 200 degree C to 4 to 20mA

Solution 2831826

Submitted on 13 Aug 2020 by Rafael S.T. Vieira
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   Pass
x = 0; y_correct = 4; assert(isequal(current_temp(x),y_correct))

2   Pass
x = 200; y_correct = 20; assert(isequal(current_temp(x),y_correct))

3   Pass
x = 100; y_correct = 12; assert(isequal(current_temp(x),y_correct))

4   Pass
x = 50; y_correct = 8; assert(isequal(current_temp(x),y_correct))

5   Pass
x = 125; y_correct = 14; assert(isequal(current_temp(x),y_correct))