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))
x =
100.0005 -49.9995 35.0005
|
2 | Fail |
F = [100];
i = 0.20;
y_correct = 83.333;
assert(isequal(calc_present(F,i),y_correct))
x =
100.0020
|
3 | Fail |
F = [-50];
i = 0.235;
y_correct = -40.486;
assert(isequal(calc_present(F,i),y_correct))
x =
-49.9977
|
4 | Fail |
F = [20 50 50 50 0 100];
i = 0.085;
y_correct = 197.425;
assert(isequal(calc_present(F,i),y_correct))
x =
20.0008 50.0008 50.0008 50.0008 0.0009 100.0008
|
485 Solvers
3968 Solvers
895 Solvers
Back to basics 9 - Indexed References
392 Solvers
376 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!