Replacement of Structure array field with array
20 views (last 30 days)
Show older comments
I have a structure with a field. I want to replace the field value for each element of the structure. I thought that this would work since it returns the values, but it errors out: [S.x] = 1:10
Want to vectorize this: for i = 1:10 S(i).x = i; end
I've seen similar questions, but nothing that seemed to work.
Thanks!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!