フィルターのクリア

Coding philosophy : Is using Simulink observers blocks like using global variables?

3 ビュー (過去 30 日間)
langrg
langrg 2021 年 2 月 22 日
コメント済み: Jonas 2021 年 2 月 22 日
Hi,
Must I considere that using observers blocks in a Simulink model is like using global variables in a code?
I dont' talk about the functionnal point of view, but about "coding philosophy".
In several companies I've worked for, I've come across coding rules that recommand to use global variables as less as possible, and more often totally avoid them...
In a code, global variables are shared between functions, while in Simulink, observers blocks allow to share variables between subsystems... But subsystems are not "functions"...
GL.
  1 件のコメント
Jonas
Jonas 2021 年 2 月 22 日
I am confused with your question, because the Observer blocks are related to facilitating a Simulink Test harness for testing models, they are not at all related to code generation. Simulink Test does not penetrate embedded generated code.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by