Cody

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

Solution 2936158

Submitted on 11 Sep 2020
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))

Error in solution: Line: 2 Column: 18 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 2 Column: 18 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!