MATLAB: Are the results in the Signal Viewer different than the scope even though they are the same signals

simulink

I have multiple signals going into a scope and also viewed in a Signal Viewer. The results should appear to be the same but they do not. The signals are of different sample times and this seems to occur with a decimation factor not equal to one.

Best Answer

This behavior is expected in Simulink. We are seeing a side effect of the scope block.
The new Signal Viewer has better robustness for plotting different sample time signals, while the scope block does not have that capability (without inserting some operations on the signals being plotted).
In essence the Scope block will convert the incoming signals to the same sample time, and for the case of the discrete signal, it will put in a unit delay. As a result, the signals may look different and it is recommended using the Signal Viewer when the signals are of different rates.