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!