Is there easier way to assign structure data

3 ビュー (過去 30 日間)
xianjie Zhou
xianjie Zhou 2014 年 10 月 13 日
編集済み: Adam 2014 年 10 月 13 日
I feel there was a way to assign structure data without repeatedly refer the parents' name. For example: A structure: Struct1.A Struct1.B Struct1.C
Is there a way to assign value like following then we don't need to type struct1 repeatedly.
struct1 { .A=1 .B=2 .C=3 }

採用された回答

Adam
Adam 2014 年 10 月 13 日
編集済み: Adam 2014 年 10 月 13 日
struct1 = struct( 'A', 1, 'B', 2, 'C', 3 );

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by