Enumerated Data Type in MATLAB
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
Laura Proctor
il 17 Giu 2011
Do you mean something like this?
x = nominal([3:-1:1,1,1,3],{'Steel','Concrete','Aluminum'})
1 Commento
Peeyush
il 17 Giu 2011
Categorie
Scopri di più su Large Files and Big Data in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!