Change settings in model properties dialog box by matlab command
1 回表示 (過去 30 日間)
古いコメントを表示
Arunkumar Muthukumaran
2015 年 4 月 21 日
コメント済み: Sebastian Castro
2015 年 4 月 21 日
Hello everyone, Currently I am working on Matlab 2014a and I am using Data dictionary in my model and hence in model properties dialog box (File-> Model Properties-> Model Properties -> Data Tab), Defined in Data Dictionary is selected (refer image)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149280/image.png)
I want to change this setting to Base workspace, through matlab command.
Can someone help in modifying this setting?
0 件のコメント
採用された回答
Sebastian Castro
2015 年 4 月 21 日
You can use the following syntax:
To change to "Base Workspace": set_param(bdroot,'DataDictionary','');
To change to "Data Dictionary": set_param(bdroot,'DataDictionary','MyDictionaryName.sldd');
Here, bdroot refers to the active model. You could also use the actual model name as a character array, like 'UPA_Distance_Indication_Visual' .
- Sebastian
0 件のコメント
その他の回答 (2 件)
Arunkumar Muthukumaran
2015 年 4 月 21 日
1 件のコメント
Sebastian Castro
2015 年 4 月 21 日
編集済み: Sebastian Castro
2015 年 4 月 21 日
For example, you can create a script that adds your models and your data dictionaries to the MATLAB path:
addpath({'myFolder/models','myFolder/data'})
Once you do that, MATLAB will have all your necessary files added to the path. There's more advanced ways to manage all yo
- Sebastian
Arunkumar Muthukumaran
2015 年 4 月 21 日
1 件のコメント
Sebastian Castro
2015 年 4 月 21 日
I see. You can use "which" to get the full path to things, assuming they are on your MATLAB path:
filePath = which('GlobalData.sldd')
Is that more like it?
参考
カテゴリ
Help Center および File Exchange で Simulink Environment Customization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!