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

49.12% Correct | 50.88% Incorrect
Last solution submitted on Jun 26, 2019

Recent Solvers152

Suggested Problems