CODES / common / struct2nv
Convert structure to name-value pairs
Contents
Syntax
- nv=CODES.common.struct2nv(struct) returns an array of name-value pairs nv from structure struct.
Example
Create name-value pairs from a structure.
struc.param1='value1';struc.param2='value2'; nv=CODES.common.struct2nv(struc); disp('Structure') disp(struc) disp('Name-Value') disp(nv)
Structure param1: 'value1' param2: 'value2' Name-Value 'param1' 'value1' 'param2' 'value2'
Copyright © 2015 Computational Optimal Design of Engineering Systems (CODES) Laboratory. University of Arizona.
Computational Optimal Design of Engineering Systems |