How to add a new field in astruct

1 vue (au cours des 30 derniers jours)
OLav Røthe Kyte
OLav Røthe Kyte le 6 Nov 2019
test=struct('generated_power',genPwr,'Platform_motions',PlatMotions)
How can I add a new field to my "test"-struct between runs?

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 6 Nov 2019
setfield(test,'NewField',1)

Plus de réponses (0)

Catégories

En savoir plus sur Structures dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by