Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!
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='I want to split this: from this';
[y1,y2] = SplitString(x,':');
y1_correct = 'I want to split this';
y2_correct = ': from this';
assert(isequal(y1,y1_correct))
assert(isequal(y2,y2_correct))

			

	    	
2
Pass
 
%%
x='This one does not have the divider';
[y1,y2] = SplitString(x,':')
y1_correct = 'This one does not have the divider'
y2_correct = ''
assert(isequal(y1,y1_correct))
assert(isequal(y2,y2_correct))
y1 =
This one does not have the divider
y2 =
     ''
y1_correct =
This one does not have the divider
y2_correct =
     ''