How to Expand an Existing Structure Array?

15 ビュー (過去 30 日間)
Rightia Rollmann
Rightia Rollmann 2017 年 3 月 4 日
回答済み: Walter Roberson 2017 年 3 月 4 日
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 件)

カテゴリ

Find more on Structures in Help Center and File Exchange

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by