Problem 2486. Get the variable value from a string and generate sum

Solution 2987260

Submitted on 24 Sep 2020 at 14:24 by David Hill
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 = 'A=10'; y = 'B=20' y_correct = 32; assert(isequal(your_fcn_name(x,y),y_correct))

y = 'B=20'

2   Pass
x = 'A=2'; y = 'B=10' y_correct = 12; assert(isequal(your_fcn_name(x,y),y_correct))

y = 'B=10'

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!