Problem 44432. basic finance application

Solution 1427770

Submitted on 29 Jan 2018 by Danilo Zocco
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
p0 = 10; p1=10.5; [mom,roc] = your_fcn_name(p0,p1) assert(mom==0.5 ) assert(roc==0.05)

mom = 0.5000 roc = 0.0500

2   Pass
p0 = 20; p1=18; [mom,roc] = your_fcn_name(p0,p1); assert(mom==-2) assert(roc==-.1)

3   Pass
p0 = 50; p1=50; [mom,roc] = your_fcn_name(p0,p1); assert(mom==0 ) assert(roc==0)

Suggested Problems

More from this Author12

Community Treasure Hunt

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

Start Hunting!