Main Content

Die Übersetzung dieser Seite ist veraltet. Klicken Sie hier, um die neueste Version auf Englisch zu sehen.

Entwurfsdaten verwalten

Zuweisung von Variablenwerten mithilfe von Modell-Workspace, Symbole, Datenobjekte und Datenklassen

Sie können MATLAB®-Variablen verwenden, um Signale und Blockparameter in einem Modell zu konfigurieren und zu verwalten. Für weitere Informationen darüber, wie Modelle Variablen verwenden, siehe Symbol Resolution. Um Variablen zu erstellen, zu bearbeiten und zu verwalten, siehe Create, Edit, and Manage Workspace Variables.

Sie können Modellvariablen im MATLAB-Basis-Workspace, in einem Modell-Workspace oder in einem Data Dictionary speichern. Um zu entscheiden, wo die Variablen für Ihr Modell gespeichert werden sollen, siehe Determine Where to Store Variables and Objects for Simulink Models.

Um Variablen zur Steuerung von Signal- und Parametereigenschaften (z.B. Datentypen und Codegenerierungseinstellungen) zu verwenden, können Sie Datenobjekte in einem Workspace oder Data Dictionary speichern. Siehe Data Objects.

Funktionen

alle erweitern

Simulink.findVarsAnalyze relationship between variables and blocks in models
matlab.io.saveVariablesToScriptSave workspace variables to MATLAB script
Simulink.data.evalinGlobalEvaluate MATLAB expression in context of Simulink model
Simulink.data.assigninGlobalModify variable values in context of Simulink model
Simulink.data.existsInGlobalCheck existence of variable in context of Simulink model
Simulink.data.dictionary.createCreate new data dictionary and create Simulink.data.Dictionary object
Simulink.data.dictionary.openOpen data dictionary for editing
Simulink.data.dictionary.getOpenDictionaryPathsReturn file names and paths of open data dictionaries
Simulink.dictionary.archdata.createCreate Simulink data dictionary and Architectural Data object (Seit R2023b)
Simulink.dictionary.archdata.openCreate Architectural Data object representing architectural data of existing Simulink data dictionary (Seit R2023b)
Simulink.LibraryDictionary.clearClear library dictionary dependency analysis (Seit R2021a)
Simulink.LibraryDictionary.refreshUpdate library dictionary dependencies (Seit R2021a)
Simulink.LibraryDictionary.resetLibraryLinksClear cached information on library dictionary links (Seit R2022a)
Simulink.data.adapters.catalogList registered file adapters (Seit R2022b)
Simulink.data.adapters.registerAdapterRegister custom file adapter (Seit R2022b)
Simulink.data.adapters.unregisterAdapterUnregister custom file adapter (Seit R2022b)

Klassen

alle erweitern

Simulink.ModelWorkspaceInteract with the model workspace of a model programmatically
Simulink.WorkspaceVarStore information about workspace variables and blocks that use them
Simulink.VariableUsageStore information about the relationship between variables and blocks in models
Simulink.CoderInfoSpecify information needed to generate code for signal, state, or parameter data
Simulink.data.DictionaryConfigure data dictionary
Simulink.data.dictionary.SectionConfigure data dictionary section
Simulink.data.dictionary.EntryConfigure data dictionary entry
Simulink.data.dictionary.EnumTypeDefinitionStore enumerated type definition in data dictionary
Simulink.dictionary.ArchitecturalDataEdit architectural data in a Simulink data dictionary programmatically (Seit R2023b)
Simulink.dictionary.archdata.DataInterfaceEdit data interface in Simulink data dictionary programmatically (Seit R2023b)
Simulink.dictionary.archdata.DataElementData element of data interface (Seit R2023b)
Simulink.dictionary.archdata.PhysicalInterfacePhysical interface (Seit R2023b)
Simulink.dictionary.archdata.PhysicalElementPhysical element of a physical interface (Seit R2023b)
Simulink.dictionary.archdata.FunctionElementFunction in client-server interface (Seit R2023b)
Simulink.dictionary.archdata.FunctionArgumentFunction argument in function element of client-server interface (Seit R2023b)
Simulink.dictionary.archdata.ServiceInterfaceService interface (Seit R2023b)
Simulink.dictionary.archdata.StructTypeStructure data type (Seit R2023b)
Simulink.dictionary.archdata.StructElementStruct element of a struct type (Seit R2023b)
Simulink.data.adapters.BaseMatlabFileAdapterBase class used to define file adapter for reading custom file formats (Seit R2022b)
Simulink.data.DataSourceWorkspaceContains data for external data source (Seit R2022b)
Simulink.data.adapters.AdapterDataTesterTest custom external file adapter (Seit R2022b)

Themen

Datenspeicherung für Simulink-Modelle

Datenspeicherung in Modell-Workspaces

  • Model Workspaces
    Place variables and objects that a model uses in a workspace that only the model can access.
  • Change Model Workspace Data
    When you store data in a model workspace, you choose a data source, such as the model file or an external MAT-file. To modify the variables at the source, you use a different procedure depending on the type of source that you selected.
  • Specify Source for Data in Model Workspace
    Store variables and objects that a model uses in the model file or in a separate file. Optionally, store the variables and objects as code that you can modify.

Datenspeicherung im Wörterbuch

Datenspeicherung in Objekten und Variablen

  • Create, Edit, and Manage Workspace Variables
    Workspace variables enable you to share information, such as parameter values and data types, between blocks and models. Use different tools and techniques to create and manipulate workspace variables.
  • Edit and Manage Workspace Variables by Using Model Explorer
    Find out which workspace variables are used by a model or block, find blocks that use a variable, find unused variables, and rename a variable everywhere it is used by blocks. Save and load variables from a separate file.
  • Data Objects
    Specify properties for parameters, signals, and states, including parameter values, outside of a block diagram by using external data objects.
  • Symbol Resolution
    You can control how blocks in a model resolve symbols to variables and objects that you create in workspaces.
  • Define Data Classes
    Customize the way your model interacts with data (signals, parameters, and states) by creating your own class of data object.
  • Upgrade Level-1 Data Classes
    Simulink no longer supports level-1 data classes. You must upgrade data classes that you created using the level-1 data class infrastructure, which was removed in a previous release.

Datenspeicherung in externen Dateien

Verwandte Informationen