Removing all elements from a struct field
이전 댓글 표시
I have a struct
>> aap.acq_details.sessions
ans =
1×13 struct array with fields:
name
I want to simply make this "name" field empty, ie. remove/reset all elements in this specific field.
댓글 수: 2
Tamer Gezici
2022년 6월 14일
편집: Tamer Gezici
2022년 6월 14일
"So I need it completely deleted, blank. It should not even have empty array in it."
MATLAB does not have a "blank". The default for unallocated cells and fields is an empty array.
C{2} = pi;
C{1}
S(2).F = pi;
S(1).F
채택된 답변
추가 답변 (1개)
Matt J
2022년 6월 14일
[aap.acq_details.sessions.name]=deal([])
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!