Why does field order matter when defining structures?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!