Problem 152. Create a cell array out of a struct

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

60.19% Correct | 39.81% Incorrect
Last solution submitted on Dec 02, 2016
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!

Join the 15-year community celebration.

Play games and win prizes!

Learn more