Problem 152. Create a cell array out of a struct

Created by Daniel in Community

Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column:

in: = 'hello'; = 3.14;


 {'foo', 'hello';
  'bar', 3.14}

Solution Stats

51.85% Correct | 48.15% Incorrect
Last solution submitted on Mar 11, 2019

Recent Solvers138

Suggested Problems

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!