Determining organization of a struct - possibly an unknown one
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!