Add a vector to a struct array
Show older comments
I have a struct array, say
a(1).b=1
a(2).b=1
a(1).c=1
a(2).c=1
and an vector, say
c=[1 2]
Now I want to add vector c to a, in order to obtain something like a.c
How can I do this without a for-loop? (actually the length of the struct is not 2, but thousands)
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!