Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
inStr = 'doug';
shift = 10;
outStr = 'nyeq';
assert(isequal(cypher(inStr, shift),outStr))
a =
'abcdefghijklmnopqrstuvwxyz'
c =
1×26 logical array
0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
a =
'qrstuvwxyzabcdefghijklmnop'
outStr =
'twek'
|
2 | Fail |
inStr = 'thequickbrownfox';
shift = 5;
outStr = 'ymjvznhpgwtbsktc';
assert(isequal(cypher(inStr, shift),outStr))
a =
'abcdefghijklmnopqrstuvwxyz'
c =
1×26 logical array
0 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0
a =
'vwxyzabcdefghijklmnopqrstu'
outStr =
'wxzacdfijlmoprs'
|
3 | Fail |
inStr = 'thecrowfliesatmidnight';
shift = 22;
outStr = 'pdaynksbheaowpiezjecdp';
assert(isequal(cypher(inStr, shift),outStr))
a =
'abcdefghijklmnopqrstuvwxyz'
c =
1×26 logical array
1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 1 0 0 0
a =
'efghijklmnopqrstuvwxyzabcd'
outStr =
'eghijklmpqrsvwxa'
|
417 Solvers
1582 Solvers
Increment a number, given its digits
506 Solvers
Basics: 'Find the eigenvalues of given matrix
257 Solvers
Create matrix of replicated elements
266 Solvers