I have created several structures based on my data using eval. The names of the structures and the names of the fields are stored in seperate arrays and the names can be different depending on the data. How can I pass these strings into a functin such as fieldnames? I keep gettting errors that the input arguments cannot be 'cell' or 'char'. So if the name of my struct is in name(1,1) how can i run fieldnames(name(1,1))
MATLAB: Passing a string to a function
struct
Related Question
- How to use structure variable names in for loop
- Matlab change structure field name by comparing it with a list of conversions
- How to add a new field in astruct
- How to preallocate memory for a structure in MATLAB 7.6 (R2008a)
- How to call a structure whose name is assigned to another variable??
- Using Set Field for multiple depths
Best Answer