Problem 43672. String Array Basics, Part 2: Convert String Array to Cell 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 string array. Your job is to convert the string array to a cell array of character vectors, which stores the same pieces of text data.
To begin with, let's assume that there are no missing type values in the input string array.
Example:
Input:
>> x = string({'I','love','MATLAB'})
x =
1×3 string array
"I" "love" "MATLAB";
Output:
>> y = {'I','love','MATLAB'}
y =
1×3 cell array
'I' 'love' 'MATLAB';
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
assert(isequal(x,y_correct)) !!! :-(
unfortunately I fell for it
Solution Comments
Show commentsProblem Recent Solvers149
Suggested Problems
-
Read a column of numbers and interpolate missing data
2349 Solvers
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
2074 Solvers
-
Program an exclusive OR operation with logical operators
745 Solvers
-
Number of 1s in a binary string
10891 Solvers
-
Circular Primes (based on Project Euler, problem 35)
645 Solvers
More from this Author28
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!