필터 지우기
필터 지우기

How can I programmatically clear subplots in Simulation Data Inspector without clearing all runs out of SDI?

조회 수: 1 (최근 30일)
I am looking for a command similar to cla but for SDI. In the GUI, I can click a button labeled "Clear Subplot" and then "Clear all Subplots" but I cannot find how to invoke this same behavior in a script. I am trying to automate the plotting of many data runs, and it takes a long time to reload the runs into SDI from the .mat file if I use Simulink.sdi.clear just to clear the subplots!
  댓글 수: 3
Raghul Gandhi
Raghul Gandhi 2018년 12월 17일
If your goal is to plot different runs and capture snapshots, the Simulink.sdi.CustomSnapshot class might be useful. This class provides the clearSignals method to clear plotted signals from all subplots in the CustomSnapshot object.
Ilija
Ilija 2019년 5월 3일
I've tried this and it only works if the current axes have focus. Otherwise, i'm unable to change status of 'Checked' field programatically. Does anyone else experiences the same problem? Is there any way to grab handle to SDI axes programatically?

댓글을 달려면 로그인하십시오.

채택된 답변

Raghul Gandhi
Raghul Gandhi 2019년 9월 19일
Starting R2019b, you can use
Simulink.sdi.clearAllSubPlots
to clear all subplots without removing any runs from SDI.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by