Cody

# Problem 1899. Convert a Cell Array into an Array

Solution 2737258

Submitted on 24 Jul 2020 by Rahul Shinde
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   Pass
x={'01', '56'; '234', '789'}; y_correct = '0123456789'; assert(isequal(your_fcn_name(x),y_correct));

y = 1×1 cell array {'01'} y = 1×1 cell array {'01234'} y = 1×1 cell array {'0123456'} y = 1×1 cell array {'0123456789'} y = '0123456789'

2   Pass
x={'' 'a' '1'; 'AA' 'BB' 'CC'; 'dog' 'cat' 'car'}; y_correct='AAdogaBBcat1CCcar'; assert(isequal(your_fcn_name(x),y_correct));

y = 1×1 cell array {0×0 char} y = 1×1 cell array {'AA'} y = 1×1 cell array {'AAdog'} y = 1×1 cell array {'AAdoga'} y = 1×1 cell array {'AAdogaBB'} y = 1×1 cell array {'AAdogaBBcat'} y = 1×1 cell array {'AAdogaBBcat1'} y = 1×1 cell array {'AAdogaBBcat1CC'} y = 1×1 cell array {'AAdogaBBcat1CCcar'} y = 'AAdogaBBcat1CCcar'

3   Pass
x={'We' 'do' ;'ll ' 'ne.'}; y_correct='Well done.'; assert(isequal(your_fcn_name(x),y_correct));

y = 1×1 cell array {'We'} y = 1×1 cell array {'Well '} y = 1×1 cell array {'Well do'} y = 1×1 cell array {'Well done.'} y = 'Well done.'

### Community Treasure Hunt

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

Start Hunting!