How can I change axes limits of the XY Graph dynamically?

47 views (last 30 days)
I would like to dynamically adjust the axes limits of an XY Graph during simulation so that the trace is visible even if it exceeds the limits initially set in the Graph’s mask.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Simulink does not provide a way to dynamically adjust the graph axes limits, but this can be done with an M-function.
The attached M-function LIMIT_CHECK checks if data is outside the axis limits, and if so, changes the limits so that the data is fully displayed.
The example Simulink model shows that the function is separately called for each axis, and that the axes limits are reset during model initialization.

More Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!