Problem 43672. String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values

Created by Peng Liu in Community

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.


>> x = string({'I','love','MATLAB'})
x = 
  1×3 string array
    "I"    "love"    "MATLAB";
>> y = {'I','love','MATLAB'}
y =
  1×3 cell array
    'I'    'love'    'MATLAB';

Related Problems in this series:

Solution Stats

61.04% Correct | 38.96% Incorrect
Last solution submitted on Jan 24, 2019

Problem Comments

Recent Solvers44

Suggested Problems

More from this Author43

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!