Problem 1981. Time and Variable mapping and matching

Solution 867065

Submitted on 6 Apr 2016 by Jean-Marie Sainthillier
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={'0','a','1','', ''; '1','b','2','', ''; '2','', '','c', '3'; '3','', '','d', '4'; '4','e','1','', ''; '5','', '','d', '6'}; Time=[0;1;2;3;4;5]; a=[1;1;1;1;1;1]; b=[0;2;2;2;2;2]; c=[0;0;3;3;3;3]; d=[0;0;0;4;4;6]; e=[0;0;0;0;1;1]; y_correct=[Time;a;b;c;d;e]; [Time,a,b,c,d,e]=your_fcn_name(X); assert(isequal([Time;a;b;c;d;e],y_correct));

2   Pass
X={'0','a','1','', ''; '1','a','2','b', '1'; '2','', '','c', '3'; '3','c','4','d', '4'; '4','b','4','', ''; '5','', '','e', '6'}; Time=[0;1;2;3;4;5]; a=[1;2;2;2;2;2]; b=[0;1;1;1;4;4]; c=[0;0;3;4;4;4]; d=[0;0;0;4;4;4]; e=[0;0;0;0;0;6]; y_correct=[Time;a;b;c;d;e]; [Time,a,b,c,d,e]=your_fcn_name(X); assert(isequal([Time;a;b;c;d;e],y_correct));

Suggested Problems

More from this Author10

Community Treasure Hunt

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

Start Hunting!