How to store instances of an object property in a cell array?
25 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rachel Anthony
am 5 Jul. 2018
Kommentiert: Guillaume
am 5 Jul. 2018
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 Kommentare
Guillaume
am 5 Jul. 2018
Then Matt guessed exactly what you wanted to do and has provided the answer.
Akzeptierte Antwort
Weitere Antworten (1)
Wooshik Kim
am 5 Jul. 2018
Bearbeitet: Wooshik Kim
am 5 Jul. 2018
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 Kommentare
Siehe auch
Kategorien
Mehr zu Data Type Identification finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!