How to store instances of an object property in a cell array?
25 ビュー (過去 30 日間)
古いコメントを表示
I am making a class that defines a property 'Expression', which accepts vectors. Is there a way to access each instance of this property and store the vectors in a cell array? Thanks!
3 件のコメント
Guillaume
2018 年 7 月 5 日
Then Matt guessed exactly what you wanted to do and has provided the answer.
採用された回答
その他の回答 (1 件)
Wooshik Kim
2018 年 7 月 5 日
編集済み: Wooshik Kim
2018 年 7 月 5 日
To add on to previous answer, add to your cell array as such
result = {obj1.Expression};
result{end+1} = obj2.Experssion;
result{end+1} = obj3.Expression;
...
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Type Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!