How to combine the name of struct together

2 次查看(过去 30 天)
I am trying to add data into few struct with different name, say if
k = 'TD',
put data into
Data.TD(i).somethingelse
and if
k = 'AB',
put some data into
Data.AB(i).somethingelse
can anyone enlighten me?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by