이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
C = NSTRUCT2CELL(S)
Recursive function that converts a nested struct S with a total of n sub-fields into a nx2 cell array C.
The first column of C lists the full names of the sub-fields and the second column contains the respective content.
In order to display long field names set format to long.
Example:
S.a.b = 1:3;
S.a.c = 1:6 > 3;
S.d(1).e = {'ABC','DEF'};
S.d(2).f = 'text';
S
S =
a: [1x1 struct]
d: [1x2 struct]
C = nstruct2cell(S)
C =
'S.a.b' [1x3 double ]
'S.a.c' [1x6 logical]
'S.d(1).e' {1x2 cell }
'S.d(1).f' []
'S.d(2).e' []
'S.d(2).f' 'text'
C{3,2}
ans =
'ABC' 'DEF'
인용 양식
Mathias Benedek (2026). NSTRUCT2CELL (https://kr.mathworks.com/matlabcentral/fileexchange/29908-nstruct2cell), MATLAB Central File Exchange. 검색 날짜: .
도움
도움 준 파일: getnestedfield
| 버전 | 퍼블리시됨 | 릴리스 정보 | Action |
|---|---|---|---|
| 1.0.0.0 |
