Filter löschen
Filter löschen

How to Expand an Existing Structure Array?

4 Ansichten (letzte 30 Tage)
Rightia Rollmann
Rightia Rollmann am 4 Mär. 2017
Beantwortet: Walter Roberson am 4 Mär. 2017
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 4 Mär. 2017
"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;

Weitere Antworten (0)

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