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 402912

Submitted on 12 Feb 2014 by James

Correct

63Size
Leading solution size is 30.
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
 
%%
x = 'Help';
y_correct = 'eHpl';
assert(isequal(reverse_within_string(x),y_correct))
lx =
     2
ans =
eH
ans =
eHpl
2
Pass
 
%%
x = 'between';
y_correct = 'tebwnee';
assert(isequal(reverse_within_string(x),y_correct))
lx =
    3.5000
[Warning: Integer operands are required for colon operator when used as index]
[> In reverse_within_string at 3
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
ans =
teb
ans =
tebwnee