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:

S.foo = 'hello';
S.bar = 3.14;

out:

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

Solution Stats

40.12% Correct | 59.88% Incorrect
Last Solution submitted on Apr 23, 2024

Problem Comments

Solution Comments

Show comments


Problem Recent Solvers1619

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!