how know size of field struct
Afficher commentaires plus anciens
hi,
Sis is a struct
D is a field of struct
size(Sis.D)
>> size(Sis.D)
Error using size
Réponse acceptée
Plus de réponses (1)
the cyclist
le 5 Juin 2023
That command will give an error for some values of Sis.D, and not for others. Regardless, I don't think it will do what you expect. For example, what do you think size(Sis.D) should give for the following struct?
Sis(1).D = [1 2];
Sis(2).D = [1 2 3];
Sis(3).D = [1; 2; 3];
Perhaps you should upload your data, and explain what you are trying to do.
1 commentaire
piero
le 5 Juin 2023
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!