What Is a Data Dictionary?
R2026bA data dictionary is a persistent repository of data that are relevant to your model. You can also use the base workspace to store design data that are used by your model during simulation. However, a data dictionary provides more capabilities.
The dictionary stores design data, which define parameters and signals, and include data that define the behavior of the model. The dictionary does not store simulation data, which are inputs or outputs of model simulation that enter and exit Inport and Outport blocks.
A data dictionary is not associated with the MATLAB® dictionary data type which is a data structure that associates each key with a corresponding value. For information on the MATLAB dictionary data type, see Dictionaries.
Dictionary Capabilities
| Dictionary Capability | Benefit |
|---|---|
| Dictionary as data source | Entries in a dictionary are persistent. You do not need to reload data during development. |
| Explicit data-model linkage | You can define a data dictionary as the data source for a model. During model simulation and code generation, the model retrieves data from the data dictionary. |
| Version handling | You can:
|
| Change tracking | When you modify an entry, its status is updated in the dictionary and stored as metadata that can be tracked. The dictionary also tracks who made the changes and when. You can also view or revert changes. |
| Entry comparison | Compare values of entries in two dictionaries. |
| Data grouping into reference dictionaries | Partition and organize data items into reference dictionaries. |
| Model-data dependency | Discover how entries are used in the model. |
| Options for fixing a missing variable | For a variable reported as undefined at compilation time:
|
| Store and partition reference data | Store and partition data that are relevant to a model, such as equipment specifications, but not used by the model during simulation. |
| Unified interface for defining data | Use the Model Explorer to work with design data in a dictionary. |
| Incremental update in memory | Improved performance and scalability with minimal memory footprint. |
| Requirements traceability linking | Navigate from a data dictionary entry to a location in a requirements document. |
Sections of a Dictionary
A Simulink data dictionary consists of four sections:
Design Data: Contains the variables and data types that define parameters, signals, and design data that determine the behavior of the model. Design data created or imported in a dictionary are stored in this section.
This section can store only certain classes and data types. See Valid Design Data Classes for more information.
Architectural Data: Stores shared definitions used in Simulink and architecture model interfaces, such as port interfaces, data types, and system wide constants as well as their platform properties. To inspect and modify architectural data use the Architectural Data Editor which can be accessed from Model Explorer by selecting the Architectural Data section and clicking the Open Architectural Data Editor button. For more information about architectural data, see What Is Architectural Data?
Configurations: Contains configuration sets, which are objects of the
Simulink.ConfigSetclass, that determine how the model is configured during simulation. These objects control attributes such as sample time and simulation start time.When you store configuration sets in a data dictionary, you use configuration references to access the configuration sets. Models with a linked data dictionary resolve configuration references to configuration sets in the dictionary. For more information about configuration references, see Share a Configuration with Multiple Models.
This section can also store variant configuration objects, which belong to the
Simulink.VariantConfigurationsclass. These objects store information about variant configurations, active and default variant settings, and definitions of the control variable associated with each configuration.Note
If you load a configuration set from the data dictionary that contains a component that is not available on your system, the parameters in the missing component are reset to their default values.
Embedded Coder Dictionary: Contains code generation definitions for use with Embedded Coder®. To inspect and modify code definitions stored in a data dictionary, use the Embedded Coder Dictionary (Embedded Coder) not the Model Explorer.
Other Data: Contains information that is relevant to your model but not used by the model during simulation. Use this section to store reference information such as data that describe physical equipment and processes that are represented by your model.
This section can store almost any built-in or custom class or data type. See Invalid Other Data Classes for more information.
Data Dictionary File Format
Since R2026b
You can save a data dictionary in a compressed binary format or an uncompressed
JSON format. When you save a dictionary in JSON format Simulink saves all sections of the dictionary into a single JSON file. Both
formats use the .sldd file extension, and existing data
dictionary workflows function identically regardless of the underlying
format.
Note
Direct modification of a JSON data dictionary outside of the Simulink environment can cause structural inconsistencies and invalid data formats, which can result in load failures.
By default, Simulink creates new data dictionaries in the binary format. To choose JSON as
the default format for new data dictionaries, in the Simulink Toolstrip, on the
Modeling tab, select Environment >
Simulink Settings. In the Simulink > Data Dictionary File pane, set File format for new data dictionary to
uncompressed-text. Alternatively, set the default
programmatically by using the set_param
function:
set_param(0,"SLDDFileFormat","uncompressed-text")
To convert an existing binary data dictionary to JSON, in the Model Explorer, on
the Model Hierarchy pane, select the data dictionary node.
Then, in the Dialog pane, set File Format
to uncompressed-text.
Alternatively, convert the data dictionary format programmatically by setting the
FileFormat property of the
Simulink.data.Dictionary object:
dd = Simulink.data.dictionary.open("myDictionary.sldd"); dd.FileFormat = "uncompressed-text"; saveChanges(dd);
Note
Using a data dictionary in JSON format with the Model Testing Dashboard (Simulink Check) or the Dependency Analyzer is not supported.
Version Control with JSON Dictionaries
Since R2026b
When you store a data dictionary in a version control system such as Git™, using the JSON format keeps the repository size more manageable than using the compressed binary format. While the initial commit of a JSON data dictionary is larger, subsequent commits require little space since only the diff is stored. In addition, JSON files can be diffed in standard pre-commit and post-commit version control workflows.
Using standard text merge tools, such as the Git
merge command, to merge JSON data dictionaries is not
recommended. Instead, use the MATLAB Comparison Tool by configuring Git to call the mlMerge function for diffs and
merges. For more information, see Customize External Source Control to Use MATLAB for Diff and Merge.
To compare and merge data dictionaries in the Simulink environment, use the visdiff function to open the Comparison Tool. Use the Comparison
Tool to compare dictionaries regardless of format.
Dictionary Usage for Models Created with Different Versions of Simulink
Simulink provides version handling for data dictionaries. When these events occur, Simulink synchronizes data in a dictionary for use with a model regardless of the Simulink version used to create the model:
You link a data dictionary that was saved in a previous version of Simulink to your model – for example, you link a data dictionary saved in R2018a to a model that you develop in R2018b.
You open a model with a linked data dictionary that was saved in a previous version of Simulink – for example, you developed a model that uses a data dictionary in R2018a and you open that model in R2018b to continue development.
To view the Simulink version in which a data dictionary is saved, in the Current Folder browser, click the data dictionary and find the Saved in Simulink version field in the Details pane. You also have the option to export (save) a data dictionary for use with models created using a different version of Simulink. To use a data dictionary you saved in a newer Simulink version in an older Simulink version, you need to export it first.
To export a data dictionary:
In the Current Folder pane of the MATLAB Command Window, navigate to the location of the data dictionary.
Double-click the name of the dictionary.
In the Model Explorer, right-click the name of the data dictionary. If you have made changes to the dictionary, in the context menu, select Save Changes.
Right-click the name of the data dictionary. In the context menu, select Export to Previous Version.
In the Export Data Dictionary to Previous Version dialog box, specify the previous version of Simulink in which you want to save the dictionary. Specify the folder into which you want Simulink to place the new version of the dictionary. The folder that you specify cannot contain dictionaries that are part of the existing dictionary hierarchy. Then, click OK.

Note
If the target version is earlier than
R2026b, the data dictionary is saved in compressed-binary format. For target versionsR2026band later, the data dictionary is saved in its current format (compressed-binary or JSON).Verify that the new version of the data dictionary exists in the folder that you specified.
Manage and Edit Entries in a Dictionary
To create, modify, and view the entries in a data dictionary, use the Model Explorer. For more information, see Create, Edit, and Manage Workspace Variables and View and Revert Changes to Dictionary Data.
To manage entries in a dictionary programmatically, see Store Data in Dictionary Programmatically.
Dictionary Referencing
You can reference one or more dictionaries in a parent dictionary. The data in the referenced dictionaries are visible in the parent dictionary. Data in the parent dictionary are visible from the child dictionary only if the child dictionary has a reference back up to the parent. Use this technique to meaningfully partition data, especially for model reference hierarchies. For more information, see Partition Dictionary Data Using Referenced Dictionaries and Partition Data for Model Reference Hierarchy Using Data Dictionaries.
Import and Export File Formats
| File Format | Import to Dictionary | Export from Dictionary |
|---|---|---|
| MAT file | ✓ | ✓ |
| MATLAB script | ✓ | ✓ |
Allow Access to Base Workspace
For information about the Enable model access to base workspace property and the Enable dictionary access to base workspace property, see Continue to Use Shared Data in the Base Workspace.
See Also
Topics
- Determine Where to Store Variables and Objects for Simulink Models
- Using a Data Dictionary to Manage the Data for a Fuel Control System
- Migrate Models to Use Simulink Data Dictionary
- View and Revert Changes to Dictionary Data
- Store Data in Dictionary Programmatically
- Link Test Cases to Requirements Documents (Requirements Toolbox)