Discontinuous display in Simulink Scope

Hi, I am running a simulink model, however, some of the signals are not displayed properly in the Scope. They are discontinuous in the scope, but if I export the data to workspace and plot them, they are continuous. Anyone knows how to solve this issue? Thank you.
Signal data in scope
I have checked the limit data points option and simulation period in the scope settings.

답변 (1개)

VBBV
VBBV 2022년 4월 22일

0 개 추천

Select the plot type as Auto in scope block. This plots the graph as continuous signals instead of discrete ones which you have.

댓글 수: 12

Ximeng Wu
Ximeng Wu 2022년 4월 22일
Hi, thanks for you reply. I just checked and It is already set as "Auto" for plot type.
VBBV
VBBV 2022년 4월 22일
편집: VBBV 2022년 4월 22일
It seems there is some change in Marker and LineStyle properties in the plot options. Deselect Marker and set to none
Ximeng Wu
Ximeng Wu 2022년 4월 22일
Hi, I have tried but nothing changed. You can see without marker, the signals are still discontinuous
VBBV
VBBV 2022년 4월 22일
편집: VBBV 2022년 4월 22일
ok, May be you're using Floating scope instead of Scope . There may be some NaN values in the signal. If there are NaN values, Scope wont display them. Can you check if signal has NaN values after exporting to data file.
Ximeng Wu
Ximeng Wu 2022년 4월 22일
Hi, I have checked the output data, there is no NaN values.
Ximeng Wu
Ximeng Wu 2022년 4월 22일
I have checked my scope too, they are not floating scope.
VBBV
VBBV 2022년 4월 22일
try with a low Quanization period, or adjust the sampling rate of the signal to get a continuous line.
Ximeng Wu
Ximeng Wu 2022년 4월 22일
Thank you, it seems it is not caused by using a low sampling rate. I used 2500Hz in my simulation.
VBBV
VBBV 2022년 4월 22일
편집: VBBV 2022년 4월 22일
Then it is likely that you're using faulty Simulink version
VBBV
VBBV 2022년 4월 22일
After changing Marker , u could see some continuity of plot as lines and dashed lines but after some time it becomes discontinuous. Observe carefully the first few time seconds they are continuous.
Ximeng Wu
Ximeng Wu 2022년 5월 3일
Thanks for your reply. I found the reason, it seems it is caused by different sampling time settings for different subsystems, if I use the scope inside the subsystem, it is discontinuous, if I output the signal and use the scope outside the subsystem, it is continuous. For now, I have this solution.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2018b

태그

질문:

2022년 4월 22일

댓글:

2022년 5월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by