Some enumeration members are unrecognized
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Bogdan -Ervin
le 26 Juil 2025
Commenté : Bogdan -Ervin
le 26 Juil 2025
It may be an elementary question, but I have an enumeration class (in a class folder) which its last 2 members are not recognized. I have the impression that those elements were recognized in Matlab R2020a.
The members I am talking about are Unknown and Nothing. They can not be referenced with Element.Unknown and Element.Nothing, but the rest of the members can be.
Why is it happening and how to solve the issue?
Thank you in advance for response!
EDIT: On my end, when I call Element.Unknown and Element.Nothing I am given the errors "The class Element has no Constant property or Static method named 'Unknown'.", respectively "The class Element has no Constant property or Static method named 'Nothing'."
0 commentaires
Réponse acceptée
Matt J
le 26 Juil 2025
Modifié(e) : Matt J
le 26 Juil 2025
I'm not encountering any problems in 2024b. Perhaps you forget that you implemented a disp method, which displays those members in a unique way.
>> Element.Doom
ans =
Doom
>> Element.Unknown
ans =
???
>> Element.Nothing
ans =
3 commentaires
Matt J
le 26 Juil 2025
That sounds more as though you have a 2nd definition of the Element class floating around somewhere on your path. You should check,
which -all Element
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur String dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!