clearing an instance of a structure variable
古いコメントを表示
hello!
I was wondering whether it is possible to clear an instance on a structure variable, as in the following example.
a = struct('name',0,'age'',0)
a(1) = struct('name','jack','age',20);
a(2) = struct('name','fred','age',28);
So my question would be: is there a way to clear either a(1), for instance, such that the final length of 'a' becomes 1, instead of 2?
採用された回答
その他の回答 (1 件)
Sean de Wolski
2011 年 1 月 24 日
a = a(2)
カテゴリ
ヘルプ センター および File Exchange で Structures についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!