Cody

# Problem 43677. String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values

Solution 1935872

Submitted on 14 Sep 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
x = {'I','love','MATLAB'}; y_correct = strings(size(x)); [y_correct{:}] = x{:}; assert(isequal(cell2str(x),y_correct))

a = 'I' b = 1×2 cell array {0×0 cell} {''I''} a = 'love' b = 1×2 cell array {1×2 cell} {''love''} a = 'MATLAB' b = 1×2 cell array {1×2 cell} {''MATLAB''} y = 1×2 cell array {1×2 cell} {''MATLAB''}

Assertion failed.

2   Fail
x = {'I', 'love', 'MATLAB' 'I', 'love', 'Cody'}; y_correct = strings(size(x)); [y_correct{:}] = x{:}; assert(isequal(cell2str(x),y_correct))

a = 'I' b = 1×2 cell array {0×0 cell} {''I''} a = 'I' b = 1×2 cell array {1×2 cell} {''I''} a = 'love' b = 1×2 cell array {1×2 cell} {''love''} y = 1×2 cell array {1×2 cell} {''love''}

Assertion failed.