Main Content

removeHighlight

Remove highlighted tracing results

Since R2021b

Description

example

removeHighlight(g) removes all highlighting in a model created by the highlight function of sltrace.Graph object g.

Examples

collapse all

This example shows how to trace from the first inport of the block vdp/x1 to all sources.

open_system('vdp')
G = sltrace('vdp/x1', 'Source','Port', 1, 'TraceAll','on');

Highlight the tracing results and plot the trace graph.

highlight(G)

vdp_highlighted_traceall.PNG

plot(G.TraceGraph)

Figure contains an axes object. The axes object contains an object of type graphplot.

Highlight the block vdp/Scope and the line connecting to the inport of vdp/Scope.

bh = get_param('vdp/Scope','Handle');
inportH = get_param('vdp/Scope','PortHandles').Inport;
lh = get_param(inportH,'line');
highlight(G,[bh, lh])

vdp_scope_highlight.PNG

Remove the highlighting.

removeHighlight(G)

vdp_rem_highlight.PNG

Input Arguments

collapse all

Graph created by sltrace function, specified as a sltrace.Graph object.

Version History

Introduced in R2021b