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 143931

Submitted on 2 Oct 2012 by Tim

Correct

35Size
Leading solution size is 17.
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
 
%%
s = 'Easy';
b = ones(1,4);
y_correct = {'E','a','s','y'};
assert(isequal(break_string(s,b),y_correct))
s = 'I seem to be having tremendous difficulty with my lifestyle';
b = [4 1 5 22];
y_correct = {'I se','e','m to ','be having tremendous d'};
assert(isequal(break_string(s,b),y_correct))