Problem 43677. String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
String array and cell array are two types of containers for storing pieces of data. In this problem, you will be given a cell array of character vectors. Your job is to convert the cell array to a string array, which stores the same pieces of text data.
To begin with, let's assume that there are no missing type values in the input cell array.
Example:
Input: >> x = {'I','Love','MATLAB'} x = 1×3 cell array 'I' 'Love' 'MATLAB'
Output: >> y = strings(size(x)); >> [y{:}] = x{:} y = 1×3 string array "I" "Love" "MATLAB"
Note that the example shown above is not the best way to solve this problem. Try other approaches in order to achieve a leading score.
Related Problems in this series:
- String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
- String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values
- String Array Basics, Part 3: Convert Cell Array with Missing Values to String Array
- String Array Basics, Part 4: Convert String Array with Missing Values to Cell Array
Solution Stats
Problem Comments
-
1 Comment
Svyatoslav Golousov
on 22 Oct 2020
You test cases contain solution=)
Solution Comments
Show commentsGroup

Computational Geometry IV
- 20 Problems
- 12 Finishers
- Minimal cost
- Placing Beads Neatly in a Box
- Convex Hull Capture
- Find the sines of an isosceles triangle when given its area and height
- solid of revolution
- Height of a right-angled triangle
- solid of revolution
- Fun with a compass
- Height of a right-angled triangle
- Minimal cost
- Find the sides of an isosceles triangle when given its area and height from its base to apex
- Find the sines of an isosceles triangle when given its area and height
- Radiation Heat Transfer — View Factors (4)
- Radiation Heat Transfer — View Factors (5)
- The cake is a lie...
- Pancakes for everyone!
- Conic equation
- Why the heck are they blinking!?!?
- Find the Area of a Polygon
- Is It a Snake?
- Placing Beads Neatly in a Box
- Fun with a compass
- Angle bisectors
- Regular polygon bounded by and bounding a circle
- solid of revolution
- Height of a right-angled triangle
- Find the sides of an isosceles triangle when given its area and height from its base to apex
- Find the sines of an isosceles triangle when given its area and height
- Euclidean distance from a point to a polynomial
- Convex Hull Capture
- Under the sea: Snell's law & total internal reflection
Problem Recent Solvers1741
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!