이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
열거형
단일 유형 값을 나타내는 고정된 이름의 집합
열거형을 사용하여 명명된 값의 고정된 집합을 나타내려면 열거형을 사용합니다. 여기서 모든 값은 동일한 종류입니다. 내장된 숫자형 등의 다른 클래스에서 열거형 클래스를 파생할 수 있습니다. 그러면 열거형 멤버는 슈퍼클래스의 산술 연산과 정렬 연산을 상속합니다.
함수
enumeration | 클래스의 열거형 멤버와 이름 |
isenum | 변수가 열거형인지 확인 |
클래스
meta.EnumeratedValue | MATLAB 클래스의 열거형 멤버 설명 |
도움말 항목
열거형의 정의와 사용
- Named Values
Associate values with predefined names using constant properties or enumeration classes. - 열거형 클래스 정의하기
classdef
파일에서 enumeration 블록을 생성하여 열거형 클래스를 정의할 수 있습니다. - Refer to Enumerations
Refer to enumeration members using the class name and the member name. - 열거형에 대한 연산
논리 연산, 집합의 원소인지 확인하는 연산, 문자열 비교 연산을 열거형에 사용합니다. - Enumeration Class Restrictions
Enumeration classes restrict certain aspects of their use and definition. - Mutable Handle vs. Immutable Value Enumeration Members
Use a handle enumeration to enumerate a set of objects whose state can change over time. Use a value enumeration to enumerate a set of abstract (and immutable) values. - Save and Load Enumerations
The type of enumeration class determines the information MATLAB® saves with the class. - Hide Enumeration Members
Hiding enumeration members enables you to replace enumeration names without creating incompatibilities.
특화된 열거형 클래스
- Enumerations Derived from Built-In Classes
Enumeration classes derived from built-in types inherit behaviors from these types. - Enumerations That Encapsulate Data
Define properties in an enumeration class to associate specific data with enumeration members. - Enumerations for Property Values
Use enumeration classes to restrict properties to a predefined set of values.