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

121 correct solutions 61 incorrect solutions
Last solution submitted on Oct 12, 2015