How to Expand an Existing Structure Array?

13 次查看(过去 30 天)
As a simple example, I create the struct B with one field:
B.D = 1;
How do I set parent struct A for the above-mentioned struct B?
A.B.D
How do I set a field between B and D?
B.C.D

采纳的回答

Walter Roberson
Walter Roberson 2017-3-4
"How do I set parent struct A for the above-mentioned struct B?"
A.B = B;
"How do I set a field between B and D?"
temp = B.D;
B = rmfield(B, 'D');
B.C.D = temp;

更多回答(0 个)

类别

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