How to add a field to a matlab struct.

3 次查看(过去 30 天)
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.

回答(1 个)

madhan ravi
madhan ravi 2019-3-15
yourstruct.c=...;
% doc setfield()
  7 个评论
madhan ravi
madhan ravi 2019-3-15
Thank you Guillaume for the explanation.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by