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 43389

Submitted on 16 Feb 2012 by S L

Correct

47Size
Leading solution size is 24.
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
 
%%
s1 = 'matlabcentral';
s2 = 'thecentralmatlab';
y_correct = true;
assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

                    
2
Pass
 
%%
s1 = 'altabcentralm';
s2 = 'thecentralmatlab';
y_correct = false;
assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

                    
3
Pass
 
%%
s1 = 'cooldrinks';
s2 = 'somecoolerdrinks';
y_correct = false;
assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

                    
4
Pass
 
%%
s1 = 'controlsystem';
s2 = 'asystemcontrol';
y_correct = true;
assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

                    
5
Pass
 
%%
s1 = 'controlsystem';
s2 = 'contorlsystem';
y_correct = false;
assert(isequal(isRotatedStrPresent(s1,s2),y_correct))