Simulink signal trace and highlight

版本 1.0.0.0 (4.0 KB) 作者: weie
Trace and highlight.
871.0 次下载
更新时间 2011/11/22

查看许可证

A modification of the "Highlight to Source" and "Highlight to Destination" functions useful in large block diagrams utilising buses.

The function uses undocumented properties TraceDestinationInputPorts and TraceSourceOutputPorts. Handle with care.

% myTraceSignal traces Simulink signals. Unlike the builtin
% "Highlight to Destination" it will only highlight signal
% routes which end on a non-virtual destination block (signal
% routes which end in e.g. a Terminator block, or signals which
% are never extracted from a bus will not be highlighted).
%
% out = myTraceSignal(direction,hBlock,porttype,sigidx,verbose)
% direction [char] 'forward' or 'back' (or 'f' or 'b')
% hBlock [handle] originating block
% porttype [char] 'inport' or 'outport' (or 'i' or 'o')
% sigidx [number] port index (optional, default ':' all ports)
% verbose [bool] command prompt text (optional, default true)
%
% Example - trace all signals entering the selected block
% (e.g. a BusCreator) to their destinations
% out = myTraceSignal('f',gcbh,'i');
%
% Note: Function is intended to trace signals (not buses) so, for example,
% for forward tracing use myTraceSignal('f',gcbh,'i') to trace destinations
% of signals entering a BusCreator, and use myTraceSignal('f',gcbh,'o')
% to trace destinations of signals leaving a BusSelector.
%
% Note: Goto blocks in back-trace are not highlighted (but the From-
% blocks and the lines are).

引用格式

weie (2024). Simulink signal trace and highlight (https://www.mathworks.com/matlabcentral/fileexchange/33883-simulink-signal-trace-and-highlight), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Composite Signals 的更多信息
致谢

启发作品: cookacounty/simulink-port-trace

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0