Built-in Function: [v1, …] = getfields (s, 'k1', …)

It is equivalent to [s.k1, …] Return selected values from a scalar struct. Provides some compatibility and some flexibility.

See also: setfields,rmfield,isfield,isstruct,struct.

Package: struct