Main Content

設計データの管理

小規模なプロジェクトと複雑なモデルの階層構造のモデル設計データを保存、分割および共有する方法を選択

設計データは、Simulink® モデルでブロック パラメーターおよび信号特性 (データ型や次元など) を指定するために使用する一連の変数およびデータ オブジェクトです。設計データのストレージ オプションには、MATLAB® ベース ワークスペース、モデル ワークスペースまたはデータ ディクショナリがあります。設計データの場所の選択は以下によって異なる場合があります。

  • モデル化の目的

  • モデル アーキテクチャ

  • データの種類

モデル データの種類の詳細と、プロジェクト用のデータ ストレージの管理方法については、Simulink モデルの変数とオブジェクトの保存場所の決定を参照してください。

データをプログラムで管理する方法については、Manage Design Data for Simulink Models Programmaticallyを参照してください。

関数

すべて展開する

Simulink.data.connectCreate Simulink.data.DataConnection object for a data source (R2024a 以降)
clearRemove specified variables from connected data source (R2024a 以降)
clearAllRemove variables from connected data source (R2024a 以降)
createCreate object in connected data source (R2024a 以降)
discardChangesDiscard data in memory and reload from connected data source (R2024a 以降)
existDetermine whether variable exists in connected data source (R2024a 以降)
getRead variables from connected data source (R2024a 以降)
getMetadataGet metadata for variable or connected data source (R2024a 以降)
hasUnsavedChangesDetermine whether connected data source has unsaved data in memory (R2024a 以降)
isConsistentDetermine whether variable definitions visible to connected data source are consistent (R2024a 以降)
renameRename specified variables in connected data source (R2024a 以降)
reportInconsistencyReport inconsistent variable definitions (R2024a 以降)
saveChangesSave data in memory for connected data source to disk (R2024a 以降)
setAssign variable in connected data source (R2024a 以降)
showOpen and show contents of connected data source in Model Explorer (R2024a 以降)
whoList variables that are in connected data source (R2024a 以降)
Simulink.data.dictionary.create新しいデータ ディクショナリの作成と Simulink.data.Dictionary オブジェクトの作成
Simulink.data.dictionary.openデータ ディクショナリを編集用に開く
Simulink.data.dictionary.getOpenDictionaryPaths開いているデータ ディクショナリのファイル名とパスを返す
Simulink.dictionary.archdata.createCreate Simulink data dictionary and Architectural Data object (R2023b 以降)
Simulink.dictionary.archdata.openCreate Architectural Data object representing architectural data of existing Simulink data dictionary (R2023b 以降)
Simulink.LibraryDictionary.clearライブラリ ディクショナリの依存関係の分析をクリア (R2021a 以降)
Simulink.LibraryDictionary.refreshUpdate library dictionary dependencies (R2021a 以降)
Simulink.LibraryDictionary.resetLibraryLinksClear cached information on library dictionary links (R2022a 以降)
Simulink.data.adapters.catalogList registered file adapters (R2022b 以降)
Simulink.data.adapters.registerAdapterRegister custom file adapter (R2022b 以降)
Simulink.data.adapters.unregisterAdapterUnregister custom file adapter (R2022b 以降)
Simulink.findVarsモデルの変数およびブロックの関係を解析します。
matlab.io.saveVariablesToScriptMATLAB スクリプトへのワークスペース変数の保存
Simulink.data.evalinGlobalSimulink モデルのコンテキスト内の MATLAB 式を評価する
Simulink.data.assigninGlobalSimulink モデルのコンテキストでの変数値の変更
Simulink.data.existsInGlobalSimulink モデルのコンテキスト内で変数の存在をチェック

オブジェクト

すべて展開する

Simulink.data.DataConnectionData source connection (R2024a 以降)
Simulink.ModelWorkspaceプログラムを使用したモデルのモデル ワークスペースの操作
Simulink.data.Dictionaryデータ ディクショナリの設定
Simulink.data.dictionary.Sectionデータ ディクショナリ セクションを設定
Simulink.data.dictionary.Entryデータ ディクショナリ エントリを設定
Simulink.data.dictionary.EnumTypeDefinitionデータ ディクショナリに列挙型定義を格納
Simulink.dictionary.ArchitecturalDataEdit architectural data in a Simulink data dictionary programmatically (R2023b 以降)
Simulink.dictionary.archdata.DataInterfaceEdit data interface in Simulink data dictionary programmatically (R2023b 以降)
Simulink.dictionary.archdata.DataElementData element of data interface (R2023b 以降)
Simulink.dictionary.archdata.PhysicalInterfacePhysical interface (R2023b 以降)
Simulink.dictionary.archdata.PhysicalElementPhysical element of a physical interface (R2023b 以降)
Simulink.dictionary.archdata.FunctionElementFunction in client-server interface (R2023b 以降)
Simulink.dictionary.archdata.FunctionArgumentFunction argument in function element of client-server interface (R2023b 以降)
Simulink.dictionary.archdata.ServiceInterfaceService interface (R2023b 以降)
Simulink.dictionary.archdata.StructTypeStructure data type (R2023b 以降)
Simulink.dictionary.archdata.StructElementStruct element of a struct type (R2023b 以降)
Simulink.data.adapters.BaseMatlabFileAdapterBase class used to define file adapter for reading custom file formats (R2022b 以降)
Simulink.data.DataSourceWorkspaceContains data for external data source (R2022b 以降)
Simulink.data.adapters.AdapterDataTesterTest custom external file adapter (R2022b 以降)
Simulink.WorkspaceVarワークスペース変数とそれを使用するブロックについての情報を格納
Simulink.VariableUsageモデル内の変数とブロックの間の関係に関する情報を保存します。
Simulink.CoderInfo信号、状態またはパラメーター データのコードを生成するために必要な情報を指定する

トピック

Simulink モデルのデータ ストレージ

モデル ワークスペースのデータ ストレージ

  • モデル ワークスペース
    そのモデルのみがアクセスできるワークスペース内で使用される変数およびオブジェクトを配置します。
  • モデル ワークスペース データの変更
    モデル ワークスペース内のデータを保存するとき、モデル ファイルまたは外部 MAT ファイルなどのデータ ソースを選択します。このソースで変数を変更するには、選択したソースのタイプに応じて異なる手順を使用します。
  • モデル ワークスペース内のデータのソースの指定
    モデルが使用する変数およびオブジェクトを、モデル ファイルまたは別のファイルに保存します。オプションで、変数およびオブジェクトを、ユーザーが編集できるコードとして保存します。

ディクショナリのデータ ストレージ

外部ファイルのデータ ストレージ

オブジェクトと変数のデータ ストレージ

  • データ オブジェクト
    外部データ オブジェクトを使用することで、ブロック線図の外部に、パラメーター値も含めたパラメーター、信号および状態のプロパティを指定します。
  • 記号の解釈
    モデル内のブロックで、記号をどのように解決して、ワークスペース内で作成する変数およびオブジェクトを入力するかを制御できます。
  • データ クラスの定義
    ユーザー独自のデータ オブジェクトのクラスを作成して、モデルがデータ (信号、パラメーターおよび状態) と相互作用する方法をカスタマイズします。
  • レベル 1 データ クラスのアップグレード
    Simulink では、レベル 1 データ クラスはサポートされなくなりました。以前のリリースで削除されたレベル 1 データ クラス インフラストラクチャを使用して作成したデータ クラスはアップグレードしなければなりません。