Borrar filtros
Borrar filtros

How to add a field to a matlab struct.

3 visualizaciones (últimos 30 días)
Daniel Boateng
Daniel Boateng el 15 de Mzo. de 2019
Comentada: madhan ravi el 15 de Mzo. de 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.

Respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by