MATLAB Answers

Sharah
0

How to combine the name of struct together

Asked by Sharah
on 16 Nov 2016
Latest activity Answered by Alexandra Harkai on 16 Nov 2016
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?

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Alexandra Harkai on 16 Nov 2016
 Accepted Answer

Data.(k)(i).somethingelse = your_value
See the Documentation for reference.

  0 Comments

Sign in to comment.