Filter löschen
Filter löschen

How to add a field to a matlab struct.

3 Ansichten (letzte 30 Tage)
Daniel Boateng
Daniel Boateng am 15 Mär. 2019
Kommentiert: madhan ravi am 15 Mär. 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.

Antworten (1)

madhan ravi
madhan ravi am 15 Mär. 2019
yourstruct.c=...;
% doc setfield()
  7 Kommentare
Daniel Boateng
Daniel Boateng am 15 Mär. 2019
Thanks bro. It works perfectly
madhan ravi
madhan ravi am 15 Mär. 2019
Thank you Guillaume for the explanation.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by