for k = 1:5
objArray(k) = ObjProp;
endAccess the RegProp property of the second element of the object array using array
indexing:objArray(2).RegPropans =91Assign the values of all RegProp properties to a numeric array:propValues = [objArray.RegProp]propValues =82 91 13 92 64Use standard indexing operations to access the values of the numeric array. For more
information on numeric arrays, see “Matrices and Arrays”.See Also
Related Examples
- “Initialize Object Arrays” on page 10-5
- “Initialize Arrays of Handle Objects” on page 10-11
- “Class Constructor Methods” on page 9-21
10 Object Arrays