Visualizing multi-dimensional structures in the Workspace
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a structure (struct variable) containing several fields such as name, age, height, etc. I used to only have two indices into this variable: the person's ID number and an experimental condition. This way, I could easily visualise the variable for debug purposes: double-clicking on it in the Workspace gave me first the 2D matrix determined by the indices, and once I clicked on a cell in the matrix I got the corresponding fields of the selected structure.
Now I needed to add one more parameter as an index into the struct, which has therefore become 3D. Visualising it is no longer possible, as the Workspace just shows it as a "4x2x9 struct with 5 fields" but doesn't let me select an index triplet and dig deeper into it. The only way I can peek into the contents is by looking at a specific index combination in the command prompt, e.g. "M(i1,i2,i3).name", but this doesn't give me the overview I wanted.
Can anyone suggest a workaround so that I can visualise the overall contents of the struct variable? Perhaps by first choosing a value for the first index, and then seeing the struct matrix corresponding to the remaining 2 dimensions?
Hopefully my description makes sense, thanks in advance!
댓글 수: 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!