Cody

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:

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

out:

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

Solution Stats

51.08% Correct | 48.92% Incorrect
Last solution submitted on May 24, 2019

Recent Solvers149

Suggested Problems