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 261340

Submitted on 14 Jun 2013 by andrea84

Correct

54Size
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
x =
    72   101   108   108   111    32    87   111   114   108   100    33
x =
    73   102   109   109   112    32    88   112   115   109   101    33
ans =
Ifmmp Xpsme!
ans =
     2
x =
    67    97   110    32    73    32   104   101   108   112    32   121   111   117    63
x =
    68    98   111    32    74    32   105   102   109   113    32   122   112   118    63
ans =
Dbo J ifmq zpv?
ans =
     3
x =
  Columns 1 through 16
    77    97   114   121    32   104    97   100    32    97    32   108   105   105   116   108
  Columns 17 through 23
   101    32   108    97   109    98    46
x =
  Columns 1 through 16
    78    98   115   122    32   105    98   101    32    98    32   109   106   106   117   109
  Columns 17 through 23
   102    32   109    98   110    99    46
ans =
Nbsz ibe b mjjumf mbnc.