Adding enumerators to classes
11 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to add a list of enumerators to class...see below for what i want
classdef Commodities
enumeration
Wheat (1001)
HS (1001)
end
properties
Imports
Exports
Production %same as above but dest will obviously be empty
Consumption
end
end
unfortunately, it tells me that i can't have properties and an enumeration within a class. That's not right surely, is it? Any body know a workaround without creating another enumeration class?
If it is I'll just change the enumeration to properties block with an attribute of constant.
Any help on this would be much appreciated!!!
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!