How to change the name of the run in Simulation Data Inspector programmatically?

4 ビュー (過去 30 日間)
I perform multiple simulations and inspect the data with the Simulation Data Inspector (SDI). In the Simulation Data Inspector all runs are identified by model name with run number. How can I programmatically specify a user defined string in the run name?

採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 2 月 5 日
編集済み: MathWorks Support Team 2022 年 2 月 5 日
It is possible to specify a user defined string in the run name programmatically. This can be achieved by specifying the string - 'runName' in the following function:
Simulink.sdi.createRun(runName)
For example, if you simulate a model named 'MyModel', with the parameter V = [1.4, 3.5] then you can specify the string 'runName' as:
runName = ['MyModel_V=' num2str(V(1))]\nrunName = ['MyModel_V=' num2str(V(2))]
Now, after simulating the model, the first run will be named as 'MyModel_V=1.4' and the second run will be named as 'MyModel_V=3.5'. For easier understanding using an example, please find attached the script -'sampleScript.m'. 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreate Large-Scale Model Components についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by