Given the structure of a function with a number of unknown fields, how do I get the name of each field?
For instance:
s = struct; s.hello = 'world'; s.foo = 12; s.bar = [ 1 2 3 ];
I need the name s (1), s (2) and s (3). In this case, I would get "hello", "foo" and "bar".
source share