Enumerated Data Type in MATLAB
이전 댓글 표시
I want to define a enumerated data type (eMatType) which consists of the following definitions :
STEEL = 1
CONCRETE = 2
ALUMINUM = 3
Now, once that data type is created, how can I use it to declare a variable. eg. if I want to delclare a variable as 'double', I use x = zeros(1,1,'double')
How can I declare a variable with the new enumerated data type?
Thanks.
채택된 답변
추가 답변 (1개)
Laura Proctor
2011년 6월 17일
Do you mean something like this?
x = nominal([3:-1:1,1,1,3],{'Steel','Concrete','Aluminum'})
카테고리
도움말 센터 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!