Is there a possibility to create dynamic enumerations?

I like the enumeration class. For "normal programming" is works very nice. But sometimes it could be nice to change (mainly add) items in the enumeration list. This would be especially useful in combination with existing code (public and my own code).
So I wonder, is there a possibility of adding items to an enumeration, or creating an enumeration object dynamically (I mean without writing a classdef file)?

 채택된 답변

Arnav Dubey
Arnav Dubey 2020년 3월 27일

0 개 추천

As per my knowledge, No, MATLAB does not support dynamic enumerations.They are really only for the benefit of compile time, as they represent a fixed set of constants, hence having them changed during runtime makes their use redundant.

댓글 수: 1

That's what I expected, but I thought: "you never know"...
Thanks,
Stijn

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Use Prebuilt MATLAB Interface to C++ Library에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2020년 3월 18일

댓글:

2020년 3월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by