MATLAB Answers

Is it possible to programmatically count the number of times a block is called during a simulation?

2 views (last 30 days)
Is it possible to programmatically count the number of times a block is called during a simulation?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Apr 2020
Yes, it is possible through the Simulink Profiler. As of MATLAB R2020a, it is possible to retrieve the information regarding the number of calls to a block in the following way:
>> profilerData = out.SimulationMetadata.TimingInfo.ProfilerData
>> profilerData.rootExecNode.children(3).children(1).children(2)
For more information on the Simulink Profiler, visit the following page:

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

No tags entered yet.

Products


Release

R2019b

Translated by