How to find number of objects in a structure?
Afficher commentaires plus anciens
Hi I'm new to Matlab. I have the following struct array and I want to save the number of objects of struct in a variable. How can I find number of objects? Any help would be appreciated

1 commentaire
What do you mean by 'object'? You mean the number of fields or the total number of things across every field? In your example you seem to just mean the number of elements in one field of the struct. If that is the case then you would be better always calculating it on demand to ensure you don't have to keep it up to date. Even better, use a class and a dependent property, but that s slightly more advanced.
Réponse acceptée
Plus de réponses (0)
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!