MATLAB Answers

0

How to add a new field in astruct

Asked by OLav Røthe Kyte on 6 Nov 2019
Latest activity Answered by Fangjun Jiang
on 6 Nov 2019
test=struct('generated_power',genPwr,'Platform_motions',PlatMotions)
How can I add a new field to my "test"-struct between runs?

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Fangjun Jiang
on 6 Nov 2019
 Accepted Answer

setfield(test,'NewField',1)

  0 Comments

Sign in to comment.