struct2nvp¶
- struct2nvp(myStruct)
STRUCT2NVP Convert a structure to a name-value pairs string
- Usage:
str = struct2nvp(myStruct)
- Inputs:
myStruct : struct - input structure – required
- Outputs:
str : char - comma-separated name-value pairs ‘field’, value, ‘field’, value, …
Example
s.field1 = 23; s.field2 = 1:5; s.field3 = ‘Testing123’; s.field4 = {‘apple’, 42, [], {‘a’,’b’,’c’}}; s.field5 = []; s.field6 = {}; str = struct2nvp(s);
See also: struct2nvpstr, struct2codestr, namedargs2cell, value2str
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿