Scope does only show one data point

22 次查看(过去 30 天)
Hello,
I don't know what is wrong with Simulink, but when I try to visualize a signal with the scope, I just get one single datapoint. After clicking "Run", I just get a datapoint at t=0 seconds. I would have expected a vertical line going from t=0 to t=10 seconds in the scope, but instead of this, there is just a "bubble" at t=0 seconds:
Why is the scope just showing one single datapoint at t=0 and not simulating for 10 seconds?
Thank you.

采纳的回答

Fangjun Jiang
Fangjun Jiang 2020-3-4
Can someone from the Mathworks give an explaination of this change on the Scope block? I've answered questions similar to this twice before. I think the "smartness" of the Scope block actually confused user.
In this extream simple example, in the Scope window, go to menu View, Style, you will see the "Marker" is set as "o". That is why. Usually, it is set as "none". But in this case, even if you set it as "none" and click "Apply", when you run simulation again, it will automatically go back to "o" and still show the same plot with just one dot.
It is the correct display, considering that the Scope is connected to the Constant block. But that is probabbly another lengthy discussion. If you want to show the "tradictional" view, you can change the sample time of the Constant block from "inf" to "-1", then you will see a horizontal line. You can further play with the setting on "Marker".
I think whatever the default behavior of the Scope with values of "inf" sample time is confusing users.
  1 个评论
SE
SE 2020-3-4
Thank you! This actually solved my simple problem.
However, if you have multiple busses connected to a scope then it is a big effort to actually track each signal back and change to "-1" at the specific block.
I would like to have the old scope back!

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by