Simulink.sdi.clearSubPlot(r,c)
clears plotted signals from the subplot at the location specified by r
and c on the active tab in the Simulation Data Inspector.
Simulink.sdi.clearSubPlot(r,c,TabIndex=idx)
clears plotted signals on the Simulation Data Inspector tab specified by the tab index
idx instead of the active tab.
Use the Simulink.sdi.clearSubPlot function to
programmatically clear plotted signals from a single subplot. For example, clear plotted
signals from the subplot in the first row and second column of a subplot layout.
Simulink.sdi.clearSubPlot(1,2)
To clear plotted signals from a subplot on a specific tab, specify
the tab index using the TabIndex name-value argument. For example,
clear plotted signals from the subplot in the first row and second column of the third tab
in the Simulation Data Inspector.
Subplot row index, specified as an integer between 1 and
8, inclusive. Use the r and c
inputs together to specify the location of the subplot for which you want to get the
visualization type. For more information about how the Simulation Data Inspector indexes
subplots, see Move Between Subplot Layouts.
Subplot column index, specified as an integer value between 1 and
8, inclusive. Use the r and c
inputs together to specify the location of the subplot for which you want to get the
visualization type. For more information about how the Simulation Data Inspector indexes
subplots, see Move Between Subplot Layouts.
Since R2026b
Tab index, specified as a positive integer between 1 and
8, inclusive. Tabs are indexed from 1 to
8, left to right in the Simulation Data Inspector. Reordering
tabs in the Simulation Data Inspector updates the indices.
You can also locate a tab programmatically using the TabsList
property of the Simulink.sdi.TabGroup object. For example, the tab named
Tab2 is at index 2.
tabGrp = Simulink.sdi.TabGroup;
allTabs = tabGrp.TabsList;
fprintf("%-10s %-10s %-10s %-10s\n", "Name","Color","Index","IsActive");
for k = 1:numel(allTabs)
fprintf("%-10s %-10s %-10d %-10d\n",allTabs(k).Name, ...
allTabs(k).Color,allTabs(k).Index,allTabs(k).IsActive);
end
Name Color Index IsActive
Tab1 none 1 0
Tab2 none 2 0
Tab3 none 3 1
When you do not specify TabIndex, the function operates on the
active tab.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.