Main Content

removeHighlight

Remove highlighted tracing results

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)

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])

Remove the highlighting.

removeHighlight(G)

Input Arguments

collapse all

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

Introduced in R2021b