Is there a possibility to create dynamic enumerations?

6 ビュー (過去 30 日間)
Stijn Helsen
Stijn Helsen 2020 年 3 月 18 日
コメント済み: Stijn Helsen 2020 年 3 月 27 日
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 日
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 件のコメント
Stijn Helsen
Stijn Helsen 2020 年 3 月 27 日
That's what I expected, but I thought: "you never know"...
Thanks,
Stijn

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by