Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
sIn = 'hello'
sOut = 'hlleo'
assert(isequal(scrambleText(sIn),sOut))
sIn =
'hello'
sOut =
'hlleo'
a =
1×1 cell array
{'hello'}
d =
1
c =
'0 0 0 0 0'
c =
'00000'
ans =
1 5
b =
'hlleo'
c =
'hlleo'
sOut =
'hlleo'
|
2 | Pass |
sIn = 'This is the first time I have used MATLAB.'
sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.'
assert(isequal(scrambleText(sIn),sOut))
sIn =
'This is the first time I have used MATLAB.'
sOut =
'Tihs is the fsrit tmie I hvae uesd MALTAB.'
a =
1×9 cell array
{'This'} {'is'} {'the'} {'first'} {'time'} {'I'} {'have'} {'used'} {'MATLAB.'}
d =
1
c =
'0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
c =
'000000000000000000000000000000000000000000'
ans =
1 42
b =
'Tihs'
c =
'Tihs00000000000000000000000000000000000000'
c =
'Tihs 0000000000000000000000000000000000000'
d =
6
b =
'is'
c =
'Tihs is00000000000000000000000000000000000'
c =
'Tihs is 0000000000000000000000000000000000'
d =
9
b =
'the'
c =
'Tihs is the0000000000000000000000000000000'
c =
'Tihs is the 000000000000000000000000000000'
d =
13
b =
'fsrit'
c =
'Tihs is the fsrit0000000000000000000000000'
c =
'Tihs is the fsrit 000000000000000000000000'
d =
19
b =
'tmie'
c =
'Tihs is the fsrit tmie00000000000000000000'
c =
'Tihs is the fsrit tmie 0000000000000000000'
d =
24
b =
'I'
c =
'Tihs is the fsrit tmie I000000000000000000'
c =
'Tihs is the fsrit tmie I 00000000000000000'
d =
26
b =
'hvae'
c =
'Tihs is the fsrit tmie I hvae0000000000000'
c =
'Tihs is the fsrit tmie I hvae 000000000000'
d =
31
b =
'uesd'
c =
'Tihs is the fsrit tmie I hvae uesd00000000'
c =
'Tihs is the fsrit tmie I hvae uesd 0000000'
d =
36
b =
'MALTAB.'
c =
'Tihs is the fsrit tmie I hvae uesd MALTAB.'
sOut =
'Tihs is the fsrit tmie I hvae uesd MALTAB.'
|
Return a list sorted by number of occurrences
1504 Solvers
819 Solvers
Omit columns averages from a matrix
527 Solvers
Relative ratio of "1" in binary number
392 Solvers
664 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!