How to remove empty fields from a struct?
조회 수: 15 (최근 30일)
이전 댓글 표시
When I load a matlab file, I am getting a struct with fields as below:
a =
struct with fields:
bt: {[1×1 struct] [] [] [] [1×1 struct] [1×1 struct]}
I would like to delete the empty fields in between. How do I do that and save the file without changing any structure to it?
I tried this solution: https://de.mathworks.com/matlabcentral/answers/368826-how-to-remove-empty-struct-fields-from-a-group-a-struct-fields
but I got this error:
Dot indexing is not supported for variables of this type.
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!