how do I extract an array of object properties from an object array (where each of the objects within that array has that property?)
Ex.:
classdef myClass
properties
myProperty = 1
end
end
--
myObjectMatrix(1:1000) = myClass()
myObjectMatrix(100:234).myProperty % what I thought would work but results in lots of individual results
[myObjectMatrix(100:234)..myProperty] works, but only in one dimension. I need to use reshape() if I have more than one dimension to 'fold' my results back.
Is there a better way?
Thanks!