How to change the name of the run in Simulation Data Inspector programmatically?
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 28 Mar 2017
Edited: MathWorks Support Team
on 5 Feb 2022
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?
Accepted Answer
MathWorks Support Team
on 5 Feb 2022
Edited: MathWorks Support Team
on 5 Feb 2022
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 Comments
More Answers (0)
See Also
Categories
Find more on Create Large-Scale Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!