Number of arithmetic operations in Simulink model

1 visualizzazione (ultimi 30 giorni)
Pavel
Pavel il 1 Lug 2015
Risposto: Rajanya il 31 Gen 2025
Is it possible to count the number of multiplications and additions in Simulink model?

Risposte (1)

Rajanya
Rajanya il 31 Gen 2025
Hi @Pavel,
You can leverage the use of 'BlockType' parameter in find_system function to find the names of all the blocks matching the type in the model.
productBlocks = find_system('<ModelName>', 'BlockType', 'Product');
A 'length()' called on 'productBlocks' will give the number of such blocks present.
Thanks.

Categorie

Scopri di più su Modeling in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by