Main Content
Dictionaries
Definition and use of dictionaries in MATLAB Function
block
Since R2024b
Since R2024b
You can use dictionaries in a MATLAB Function block. A
dictionary
is a data structure containing keys and values, in which
each unique key is associated with a corresponding value. Because dictionary
keys do not have to be integers, dictionaries provide more flexibility for data
access than array indices. Using dictionaries can also improve
performance.
Topics
- Generate Code for Dictionaries
Use dictionaries in MATLAB® code intended for code generation.
- Dictionary Limitations for Code Generation
Adhere to code generation restrictions for dictionaries in MATLAB code intended for code generation.