Why does the following line display more signals if I have the model open than if I have it closed

1 次查看(过去 30 天)
I have previously saved a simulation output from simulink test as a dataset in a mat file. If I open the file with Data Inspector using the following line with the Top model I used to create it open, it shows all the signals I logged, if I open it with the model closed it shows 90% of the signals. This is completely baffling me, why should it matter if my model is open! My use case is I want to send mat files containing lots of logged data to another department, who can then view them/ process them to extract the signals they want. If I use a spreadsheet the size of the file and time taken to process it is very large, if I use a mat file and give them a script to process it/ ask them to use data inspector as shown below then the system is manageable. Everything was working fine for me, then I sent it to a colleague and found this mysterious problem. Any ideas, can't even find an obvious pattern in the signals that are missed off.
thisRun= Simulink.sdi.Run.create('softrun', 'file', 'c:\somePreviouslySavedDataset.mat')
Thanks for any help
Richard
  1 个评论
Alvaro
Alvaro 2022-12-29
编辑:Alvaro 2022-12-29
Could you describe every step of your workflow? It is not clear to me why the Simulink Data Inspector would show additional signals when the model is open. Could it be possible that you are overriding signal logging settings when saving your output?
If you can, delete all runs in the Simulink Data Inspector (Simulink.sdi.clear) and restart MATLAB. Open the model in the Simulink Editor but do not run it and try executing the Simulink.sdi.Run.create command again. Repeat all these steps but do not open the model in the Simulink Editor. Do you still see a difference between the signals that are shown in the Simulink Data Inspector when the model is open and when it is not?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by