Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 171679

Submitted on 3 Dec 2012 by J.R.! Menzinger

Correct

23Size
Leading solution size is 12.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
1 %%
x = 'Hello World!';
y_correct = 'Ifmmp Xpsme!';
assert(isequal(si(x),y_correct))
2 %%
x = 'Can I help you?';
y_correct = 'Dbo J ifmq zpv?';
assert(isequal(si(x),y_correct))
3 %%
x = 'Mary had a liitle lamb.';
y_correct = 'Nbsz ibe b mjjumf mbnc.';
assert(isequal(si(x),y_correct))
ans =
     1
ans =
     1     2     3     4     5     7     8     9    10    11
ans =
     2
ans =
     1     2     3     5     7     8     9    10    12    13    14
ans =
     3
ans =
  Columns 1 through 16
     1     2     3     4     6     7     8    10    12    13    14    15    16    17    19    20
  Columns 17 through 18
    21    22