Filter löschen
Filter löschen

Comment out block vs grounding signal

2 Ansichten (letzte 30 Tage)
Nishant Bhanot
Nishant Bhanot am 5 Dez. 2017
Beantwortet: Sebastian Castro am 26 Jan. 2018
Is there a computational difference / simulation performance difference between commenting a block out vs grounding the signal of that block? I am working with a huge model with hundreds of bus signals which are used by referenced subsystems based on which version of the referenced subsystem is being called for that particular simulation. Will there be any performance benefits of commenting out signals as right now I ground the bus signals I do not use. If the difference is marginal how big does the model need to be to start finding measurable performance difference of using one method over the other? Thanks

Antworten (1)

Sebastian Castro
Sebastian Castro am 26 Jan. 2018
As far as I know, I don't think there is a difference.
In both cases, any block optimizations at code generation will remove unnecessary calculations that lead to grounds/commented-out blocks.
The best way to find out, though, is to try it yourself and look at the generated code :)
- Sebastian

Kategorien

Mehr zu Subsystems 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