Cody

Solution 1306174

Submitted on 20 Oct 2017 by Nabor Reyna Jr.
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
s1 = 'I love MATLAB'; s2_correct = 'V ybir ZNGYNO'; assert(isequal(rot13(s1),s2_correct))

str = 'abcdefghijklmnopqrstuvwxyz' cInd = 9 nInd = 22 cInd = 1×0 empty double row vector cInd = 12 nInd = 25 cInd = 15 nInd = 2 cInd = 22 nInd = 9 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 13 nInd = 0 cInd = 1 nInd = 14 cInd = 20 nInd = 7 cInd = 12 nInd = 25 cInd = 1 nInd = 14 cInd = 2 nInd = 15

2   Pass
s1 = 'I <3 MATLAB!!'; s2_correct = 'V <3 ZNGYNO!!'; assert(isequal(rot13(s1),s2_correct))

str = 'abcdefghijklmnopqrstuvwxyz' cInd = 9 nInd = 22 cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 13 nInd = 0 cInd = 1 nInd = 14 cInd = 20 nInd = 7 cInd = 12 nInd = 25 cInd = 1 nInd = 14 cInd = 2 nInd = 15 cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector

3   Pass
s1 = 'The quick fox stumbled over the confusing instructions.'; s2_correct = 'Gur dhvpx sbk fghzoyrq bire gur pbashfvat vafgehpgvbaf.'; assert(isequal(rot13(s1),s2_correct))

str = 'abcdefghijklmnopqrstuvwxyz' cInd = 20 nInd = 7 cInd = 8 nInd = 21 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 17 nInd = 4 cInd = 21 nInd = 8 cInd = 9 nInd = 22 cInd = 3 nInd = 16 cInd = 11 nInd = 24 cInd = 1×0 empty double row vector cInd = 6 nInd = 19 cInd = 15 nInd = 2 cInd = 24 nInd = 11 cInd = 1×0 empty double row vector cInd = 19 nInd = 6 cInd = 20 nInd = 7 cInd = 21 nInd = 8 cInd = 13 nInd = 0 cInd = 2 nInd = 15 cInd = 12 nInd = 25 cInd = 5 nInd = 18 cInd = 4 nInd = 17 cInd = 1×0 empty double row vector cInd = 15 nInd = 2 cInd = 22 nInd = 9 cInd = 5 nInd = 18 cInd = 18 nInd = 5 cInd = 1×0 empty double row vector cInd = 20 nInd = 7 cInd = 8 nInd = 21 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 3 nInd = 16 cInd = 15 nInd = 2 cInd = 14 nInd = 1 cInd = 6 nInd = 19 cInd = 21 nInd = 8 cInd = 19 nInd = 6 cInd = 9 nInd = 22 cInd = 14 nInd = 1 cInd = 7 nInd = 20 cInd = 1×0 empty double row vector cInd = 9 nInd = 22 cInd = 14 nInd = 1 cInd = 19 nInd = 6 cInd = 20 nInd = 7 cInd = 18 nInd = 5 cInd = 21 nInd = 8 cInd = 3 nInd = 16 cInd = 20 nInd = 7 cInd = 9 nInd = 22 cInd = 15 nInd = 2 cInd = 14 nInd = 1 cInd = 19 nInd = 6 cInd = 1×0 empty double row vector

4   Pass
s1 = 'Snape kills Dumbledore on page 606. Also, there is no Santa.'; s2_correct = 'Fancr xvyyf Qhzoyrqber ba cntr 606. Nyfb, gurer vf ab Fnagn.'; assert(isequal(rot13(s1),s2_correct))

str = 'abcdefghijklmnopqrstuvwxyz' cInd = 19 nInd = 6 cInd = 14 nInd = 1 cInd = 1 nInd = 14 cInd = 16 nInd = 3 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 11 nInd = 24 cInd = 9 nInd = 22 cInd = 12 nInd = 25 cInd = 12 nInd = 25 cInd = 19 nInd = 6 cInd = 1×0 empty double row vector cInd = 4 nInd = 17 cInd = 21 nInd = 8 cInd = 13 nInd = 0 cInd = 2 nInd = 15 cInd = 12 nInd = 25 cInd = 5 nInd = 18 cInd = 4 nInd = 17 cInd = 15 nInd = 2 cInd = 18 nInd = 5 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 15 nInd = 2 cInd = 14 nInd = 1 cInd = 1×0 empty double row vector cInd = 16 nInd = 3 cInd = 1 nInd = 14 cInd = 7 nInd = 20 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 1 nInd = 14 cInd = 12 nInd = 25 cInd = 19 nInd = 6 cInd = 15 nInd = 2 cInd = 1×0 empty double row vector cInd = 1×0 empty double row vector cInd = 20 nInd = 7 cInd = 8 nInd = 21 cInd = 5 nInd = 18 cInd = 18 nInd = 5 cInd = 5 nInd = 18 cInd = 1×0 empty double row vector cInd = 9 nInd = 22 cInd = 19 nInd = 6 cInd = 1×0 empty double row vector cInd = 14 nInd = 1 cInd = 15 nInd = 2 cInd = 1×0 empty double row vector cInd = 19 nInd = 6 cInd = 1 nInd = 14 cInd = 14 nInd = 1 cInd = 20 nInd = 7 cInd = 1 nInd = 14 cInd = 1×0 empty double row vector