How to combine the name of struct together

1 view (last 30 days)
I am trying to add data into few struct with different name, say if
k = 'TD',
put data into
and if
k = 'AB',
put some data into
can anyone enlighten me?

Accepted Answer

Alexandra Harkai
Alexandra Harkai on 16 Nov 2016
Data.(k)(i).somethingelse = your_value
See the Documentation for reference.

More Answers (0)


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!