
How do i store Data types of Input and Outputs of a block in Simulink in a data dictionary ?
3 ビュー (過去 30 日間)
古いコメントを表示
I have created a Data Dictionary for a block model in Simulink ? I have an array where i have stored all the INouts and Outputs with the data types of each Input and Output.
I have used the addEntry(MyDictionaryObject ,Input_Output , DataTypes) , but this command gives me a data dictionary with the names( in one column i.e which is nothing but the 'Input_Output') and the value on the side as Data types .
I want to have the DataTypes in the Data types column in the data dictionary . IS there any command which i can use in script by which i put all the data types in the Dat types column in the dictionary.
Thank you in advance
0 件のコメント
回答 (1 件)
Rajanya
2025 年 2 月 12 日 9:58
You can achieve the same if the entries are provided as Simulink parameters, like:
parameter = Simulink.Parameter;
parameter.DataType = entryDataType; % entryDataType stores the required dataType for 'entryName'
addEntry(dictDesignDataObj, entryName, parameter); % added as a parameter obj (for 'entryName')
The following Inputs and Outputs, when added to a dictionary like above, alligns their data types in the respective column -

To know more about Simulink parameters, you can refer to its documentation page by executing the following from MATLAB Command Window -
doc Simulink.Parameter
Hope this answers. Thanks!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Manage Design Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!