Cody

Solution 294821

Submitted on 2 Aug 2013 by Alfonso Nieto-Castanon
  • Size: 72
  • 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
%% str = '*rrr'; melody = '*-*-*-*'; assert(strcmp(parsons(str),melody))
[Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7] [Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7]
2   Pass
%% str = '*du'; melody = ['* *' ' \ / ' ' * ']; assert(strcmp(parsons(str),melody))
[Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7] [Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7]
3   Pass
%% str = '*ruuddduur'; melody = [' * ' ' / \ ' ' * * *-*' ' / \ / ' '*-* * * ' ' \ / ' ' * ']; assert(strcmp(parsons(str),melody))
[Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7] [Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7]
4   Pass
%% str = '*rududdrudud'; melody = [' * * ' ' / \ / \ ' '*-* * * * * ' ' \ / \ / \ ' ' *-* * *']; assert(strcmp(parsons(str),melody))
[Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7] [Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7]
5   Pass
%% str = '*rururddrdrdrd'; melody = [' *-* ' ' / \ ' ' *-* * ' ' / \ ' '*-* *-* ' ' \ ' ' *-* ' ' \ ' ' *-* ' ' \ ' ' *']; assert(strcmp(parsons(str),melody))
[Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7] [Warning: Out of range or non-integer values truncated during conversion to character.] [> In ppval at 67 In pchip at 87 In parsons at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14 In workspacefunc at 7]