Why does a Scope block connected to a constant signal show only a single point instead of a constant line?

21 ビュー (過去 30 日間)
Why does a Scope block connected to a constant signal show only a single point instead of a constant line?
It looks like the following:

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 9 月 3 日
編集済み: MathWorks Support Team 2024 年 9 月 3 日
In the simple case where a constant block is directly connected to a Scope block of "inherited" sample time, the Scope block inherits the inf sample time. This means that the scope block only executes once at the very start of simulation.  See here for more details about inf sample time (also known as "Constant" sample time) -- https://www.mathworks.com/help/simulink/ug/types-of-sample-time.html#brrdmmw-10. If you change the sample time of the scope or connect a second signal that is not sampled at inf, it’ll behave as expected.
Now it looks like the following:
Other distinctions to make:
1. The Simulation Data Inspector doesn’t have a block-sorted execution order (i.e. to inherit sample times) so will show a continuous line if the above signal is logged.
2. The DSP time scope is "port-based" (as opposed to "block-based" so its behavior is unique when it comes to inheriting sample times and you will see what appears to be a continuous line if used in the above scenario (which is in fact sampled at the default discrete rate since this scope is optimized for discrete time processing).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by