Overlay signals in the scope of Xcos (Scilab)

1.6k Views Asked by At

Image

The above image is the result of using the cmscope block, but I want to overlap the signals. Is it possible?

1

There are 1 best solutions below

0
On

Yes. You should use a multiplexer, the MUX block, with the single display scope, CSCOPE. The image below shows what you should do.

enter image description here

The MUX put all the incoming signals (which are actually vectors of data) into a single matrix and pass it forward in the simulation. Whenever you need all your data in a single variable, use a MUX.

In this case, it sends a matrix with 2 columns to the plot function that lies within CSCOPE, whereas in your original problem, you pass two matrix of 1 column each to CMSCOPE which uses something like subplot() to create separated curves.