Determining organization of a struct - possibly an unknown one
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Is there a way to get the data types of a structure without manually or programmatically going through each element (and potentially recursively)?
1) Simple case: >> files = dir('*.*'); >> files
27x1 struct array with fields: name date bytes isdir datenum
>> class(files(1).name) ans = char
I can check each field individually but think there ought to be some way of getting the data type side-by-side. I've tried who, whos, fieldnames, and such without success
2) Less simple cases: Since big structs can have little structs within them, I'm trying to figure out how to determine the overall organization of a complicated "as-received"structure. I am currently doing it by looking in the workspace editor and making notes but this has its limits
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!