How to add a new field in astruct

1 visualizzazione (ultimi 30 giorni)
test=struct('generated_power',genPwr,'Platform_motions',PlatMotions)
How can I add a new field to my "test"-struct between runs?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by