How to store instances of an object property in a cell array?
24 次查看(过去 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 个评论
采纳的回答
更多回答(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 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!