이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
사전
값을 인덱싱하는 키를 사용하여 데이터 매핑
사전은 각 키와 키에 대응하는 값을 연결하는 데이터 구조입니다. 키와 값은 모든 데이터형이 될 수 있으며, 데이터 액세스에 있어 배열 인덱스보다 더 나은 유연성과 향상된 성능을 제공합니다.
더 많은 데이터형을 키와 값으로 지원하고 더 나은 성능을 제공하기 때문에 dictionary
가 containers.Map
보다 권장됩니다. (R2022b 이후)
함수
dictionary | Object that maps unique keys to values (R2022b 이후) |
entries | Key-value pairs of dictionary (R2022b 이후) |
keys | Keys of dictionary (R2022b 이후) |
values | Values of dictionary (R2022b 이후) |
types | Types of dictionary keys and values (R2022b 이후) |
numEntries | Number of key-value pairs in dictionary (R2022b 이후) |
isConfigured | Determine if dictionary has types assigned to keys and values (R2022b 이후) |
isKey | Determine if dictionary contains key (R2022b 이후) |
keyHash | Generate hash code for dictionary key (R2022b 이후) |
keyMatch | Determine if two dictionary keys are the same (R2022b 이후) |
클래스
도움말 항목
- 사전으로 데이터 매핑하기
사전을 사용하여 서로 다른 데이터형의 키-값 쌍을 저장합니다. (R2022b 이후)
- Dictionaries and Custom Classes
Modify custom classes for expected behavior in dictionaries.