Why does field order matter when defining structures?
古いコメントを表示
Two structures with the same field names in a different order can not be set to equal each other, even though they are nearly identical.
This example shows the problem:
a(1).begin = 1;
a(1).end = 2;
b.end = 3;
b.begin = 4;
a(2) = b;
% Error :
??? Subscripted assignment between dissimilar structures.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Structures についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!