필터 지우기
필터 지우기

How can I load a preferences view (with Simulink.sdi.loadView) in simuation data inspector only with .mat file ?

조회 수: 2 (최근 30일)
Hi community,
I am trying to load .mat files for debug using Simulation Data Inspector, and sometimes I need to check the same signals for differents .mat files, For that I found a way that may help me, which is Simulink.sdi.loadView('savedView.mldatx'), but its dones not work as expected for me (using Matlab 2020b).
here's a steps:
1-In a folder a have a .mat file, and I put the main matlab path in that folder Path.
in Command windows put the below commands
2-Simulink.sdi.view
3-runID = Simulink.sdi.createRun('Name of mat file','file','file.mat');
after having the .mat loaded, I can setup my signals preferences and plot layout, then I save it with:
4-Simulink.sdi.saveView('saveAview') %here I save the view that I need to load each time
Now the steps to load the saved preferences.
5-Simulink.sdi.clear
6-runID = Simulink.sdi.createRun('Name of mat file','file','file.mat'); %load again my .mat file
4-Simulink.sdi.loadView('savedView.mldatx'); %load my saved preferences.
But it only loading the plot layout dimension (ie, 3x3) and not the signals within the plots.
can you please help if you have the same problem doing the same steps ?
Thanks in advance for your help

채택된 답변

Sarah Blagdon
Sarah Blagdon 2022년 10월 19일
편집: Sarah Blagdon 2022년 10월 19일
I think the problem is that the name of the saved view doesn't match the name of the view you are loading. What happens if you use Simulink.sdi.loadView('saveAview.mldatx') instead? Here's a little code template similar to yours that worked for me:
Simulink.sdi.view
runID1 = Simulink.sdi.createRun('run1','file','file1.mat');
Simulink.sdi.saveView('saveAview')
Simulink.sdi.clear
runID2 = Simulink.sdi.createRun('run2','file','file2.mat');
Simulink.sdi.loadView('saveAview.mldatx');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Analyze Simulation Results에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by