How can I highlight the direct feedthrough paths in Simulink?

1 Ansicht (letzte 30 Tage)
I am using the "sizes" option from the command-line to determine if my model contains any direct feedthrough. For example, if my model is named mymodel.mdl, the "sizes" option can be accessed by typing:
[sys,x0,str,ts] = mymodel([],[],[],'sizes');
The output "sys" includes a flag which shows whether or not the model has a direct feedthrough path. I would like to be able to find out which blocks are involved in any direct feedthrough paths, with a graphical display which highlights the blocks.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2009
The ability to highlight direct feedthrough paths is not available in Simulink.
To work around this issue do the following:
1. Download the attached script find_feedthrough.m
2. Select the subsystem and run find_feedthrough.m:
find_feedthrough(gcb)
The MATLAB file will print a list of the ports that have a direct feedthrough inside the subsystem.
It sets the option “Algebraic Loop” in "Configuration Parameters -> Diagnostics" to Error. It connects all pairs of input and output ports, simulates the model and checks if there is an error. If there is an error, it assumes that there has been a direct feedthrough between the two ports.

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by