I have created an array of objects and I would like assign a property value in a vector operation without using a for loop. Unfortunately I get an error.
A simplifi
I see what you're trying to do now. Use disperse from the MATLAB File Exchange:
>> [vecMyArray.dblMyProperty1] = disperse(1:100); >> vecMyArray(1).dblMyProperty1 ans = 1 >> vecMyArray(10).dblMyProperty1 ans = 10