Discover MakerZone

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

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!

Problem 152. Create a cell array out of a struct

Created by Daniel

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}

Problem Group

Solution Statistics

126 correct solutions 67 incorrect solutions
Last solution submitted on Jul 12, 2016