Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
str = '*rrr';
melody = '*-*-*-*';
assert(strcmp(parsons(str),melody))
|
2 | Pass |
str = '*du';
melody = ['* *'
' \ / '
' * '];
assert(strcmp(parsons(str),melody))
|
3 | Pass |
str = '*ruuddduur';
melody = [' * '
' / \ '
' * * *-*'
' / \ / '
'*-* * * '
' \ / '
' * '];
assert(strcmp(parsons(str),melody))
|
4 | Pass |
str = '*rududdrudud';
melody = [' * * '
' / \ / \ '
'*-* * * * * '
' \ / \ / \ '
' *-* * *'];
assert(strcmp(parsons(str),melody))
|
5 | Pass |
str = '*rururddrdrdrd';
melody = [' *-* '
' / \ '
' *-* * '
' / \ '
'*-* *-* '
' \ '
' *-* '
' \ '
' *-* '
' \ '
' *'];
assert(strcmp(parsons(str),melody))
|
Swap the first and last columns
9897 Solvers
Back to basics 21 - Matrix replicating
904 Solvers
Make a run-length companion vector
453 Solvers
Generate N equally spaced intervals between -L and L
441 Solvers
Find the dimensions of a matrix
267 Solvers