How to check if Constant and Gain blocks are too small
3 ビュー (過去 30 日間)
古いコメントを表示
How can I write a script to identify all Constant and Gain blocks in a Simulink model that are too small to fully display their values?
Currently, I compare the actual block size (obtained via
get_param(block, 'Position')
) with an estimated required size. This estimation is based on the length of the Value parameter multiplied by an assumed pixel width per character. However, this approach leads to inaccuracies, especially for blocks that are borderline too small.
Is there a more robust or straightforward method to determine if the block size is adequate?
2 件のコメント
Andreas Goser
2024 年 12 月 5 日
While I probably would do a similar approach than you, I wonder what the underlying reason could be for this happening in the first place.
回答 (1 件)
Oliver Jaehrig
2024 年 12 月 6 日
There is currently no documented way to do this in a more robust way. I agree with @Andreas Goser that it might be good to better understand the root cause.
If you can use undocumented features, please contact our Technical Support team via an official case and let us know your use case and we can check if we can send you a better way to do that.
Also please share the full use case with us (if you want to code a Model Advisor check for example).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Automotive Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!