Remove completely an object inside another object
1 回表示 (過去 30 日間)
古いコメントを表示
The property PipeBolt of the oject Bolt has several objects inside.
I can add new objects doing:
Bolt(1,1).PipeBolt(N,1) = newobj;
I can also delete an object doing:
Bolt(1,1).PipeBolt(N,1).delete
However the size of the Bolt(1,1).PipeBolt(N,1) will be the same before and after delete the object. I need to remove completely the object how can I do this?
Basically before I add a new object I have the size (3x1) but after delete the object I still have a 4x1 insted the original 3x1.
thank you in advance
0 件のコメント
採用された回答
Guillaume
2016 年 1 月 27 日
You use the same rules to delete array elements regardless of their content, so:
Bolt(1, 1).PipeBolt(N, 1) = [];
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Software Development Tools についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!