Cody

# Problem 43616. Opposite task convert string hexadecimal numbers array into array of decimal numbers .

Solution 1698487

Submitted on 22 Dec 2018 by HH
• Size: 9
• This is the leading solution.
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=[ '208'; '209'; '20A'; '20B'; '20C'; '20D'; '20E'; '20F'; '210'; '211'; '212'; '213'; '214'; '215'; '216'; '217'; '218'; '219'; '21A'; '21B'; '21C']; y_correct =[520; 521; 522; 523; 524; 525; 526; 527; 528; 529; 530; 531; 532; 533; 534; 535; 536; 537; 538; 539; 540]; assert(isequal(HexToDec(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In HexToDec (line 2) In ScoringEngineTestPoint1 (line 43) In solutionTest (line 3)]

2   Pass
x=['32'; '33'; '34'; '35'; '36'; '37'; '38'; '39'; '3A'; '3B'; '3C'; '3D'; '3E'; '3F'; '40'; '41'; '42'; '43'; '44'; '45'; '46' ]; y_correct =[50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70]; assert(isequal(HexToDec(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In HexToDec (line 2) In ScoringEngineTestPoint2 (line 43) In solutionTest (line 5)]