Number of arithmetic operations in Simulink model

1 次查看(过去 30 天)
Is it possible to count the number of multiplications and additions in Simulink model?

回答(1 个)

Rajanya
Rajanya 2025-1-31
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.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by