Cody

Problem 44296. String Delimination and Outputting

Solution 1974266

Submitted on 13 Oct 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
delim_str = 'apple pear'; str1 = 'apple'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×2 cell array {'apple'} {'pear'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test1 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

2   Fail
delim_str = 'apple pear pineapple'; str1 = 'apple'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×3 cell array {'apple'} {'pear'} {'pineapple'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test2 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

3   Fail
delim_str = 'one'; str1 = 'one'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×1 cell array {'one'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test3 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

4   Fail
delim_str = 'one two three'; str1 = 'one'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×3 cell array {'one'} {'two'} {'three'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test4 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

5   Fail
delim_str = '123 456'; str1 = '123'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×2 cell array {'123'} {'456'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test5 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

6   Fail
delim_str = '123456'; str1 = '123456'; assert(isequal(your_fcn_name(delim_str),str1))

ans = 1×1 cell array {'123456'}

Output argument "str1" (and maybe others) not assigned during call to "your_fcn_name". Error in Test6 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!