Cody

Solution 1734439

Submitted on 23 Feb 2019
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 = [100 -50 35]; i = 0.05; y_correct = 80.121; assert(isequal(calc_present(F,i),y_correct))

Undefined function or variable 'f'. Error in calc_present (line 2) x=f/1+(i/100) Error in Test1 (line 4) assert(isequal(calc_present(F,i),y_correct))

2   Fail
F = [100]; i = 0.20; y_correct = 83.333; assert(isequal(calc_present(F,i),y_correct))

Undefined function or variable 'f'. Error in calc_present (line 2) x=f/1+(i/100) Error in Test2 (line 4) assert(isequal(calc_present(F,i),y_correct))

3   Fail
F = [-50]; i = 0.235; y_correct = -40.486; assert(isequal(calc_present(F,i),y_correct))

Undefined function or variable 'f'. Error in calc_present (line 2) x=f/1+(i/100) Error in Test3 (line 4) assert(isequal(calc_present(F,i),y_correct))

4   Fail
F = [20 50 50 50 0 100]; i = 0.085; y_correct = 197.425; assert(isequal(calc_present(F,i),y_correct))

Undefined function or variable 'f'. Error in calc_present (line 2) x=f/1+(i/100) Error in Test4 (line 4) assert(isequal(calc_present(F,i),y_correct))