Scope does only show one data point

31 Ansichten (letzte 30 Tage)
SE
SE am 4 Mär. 2020
Kommentiert: SE am 4 Mär. 2020
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.

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 4 Mär. 2020
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 Kommentar
SE
SE am 4 Mär. 2020
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!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by