Cody

Solution 2097224

Submitted on 18 Jan 2020 by Asif Newaz
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
before = 54.3; after = 46.5; y_correct = 4; assert(isequal(fcn(before,after),y_correct))

y = 52.1280 y = 50.0429 y = 48.0412 y = 46.1195

2   Pass
before = 65.0; after = 50.0; y_correct = 7; assert(isequal(fcn(before,after),y_correct))

y = 62.4000 y = 59.9040 y = 57.5078 y = 55.2075 y = 52.9992 y = 50.8793 y = 48.8441

3   Pass
before = 95.7; after = 55.5; y_correct = 14; assert(isequal(fcn(before,after),y_correct))

y = 91.8720 y = 88.1971 y = 84.6692 y = 81.2825 y = 78.0312 y = 74.9099 y = 71.9135 y = 69.0370 y = 66.2755 y = 63.6245 y = 61.0795 y = 58.6363 y = 56.2909 y = 54.0392