![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1825849/image.png)
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 -
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1825849/image.png)
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!