Clear Filters
Clear Filters

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

1 view (last 30 days)
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 Comment
Alvaro
Alvaro on 29 Dec 2022
Edited: Alvaro on 29 Dec 2022
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?

Sign in to comment.

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!