Azzera filtri
Azzera filtri

How to add a field to a matlab struct.

3 visualizzazioni (ultimi 30 giorni)
Daniel Boateng
Daniel Boateng il 15 Mar 2019
Commentato: madhan ravi il 15 Mar 2019
I have a matlab function that takes a struct array in my workspace as an input.The struct has fields a and b. I want to add another field c in the struct. Please how fdo I do this.

Risposte (1)

madhan ravi
madhan ravi il 15 Mar 2019
yourstruct.c=...;
% doc setfield()
  7 Commenti
Daniel Boateng
Daniel Boateng il 15 Mar 2019
Thanks bro. It works perfectly
madhan ravi
madhan ravi il 15 Mar 2019
Thank you Guillaume for the explanation.

Accedi per commentare.

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