Can a scope block plot the difference, sum, (or other math operations) between two or more signals DIRECTLY in the scope in Simulink 7.3 (R2009a)?

I am testing the error between signals at test points in my model. However, this requires me to hook up the wires to the locations, take the difference, and plot the difference. It would be much easier and efficient if I could just Right click on the signal -> Connect to existing viewer. Then, in the scope I could select to plot the difference between the two signals. Currently, I have to route the signals to a sum (difference) block and feed that output to the viewer but this is time consuming when I need to test multiple points and quickly check around my model.

 Risposta accettata

The ability to do this directly in a scope is not possible in Simulink 7.3 (R2009a). An enhancement request has been submitted.
To workaround this issue, right-click and log signal data to a unique variable name. You could then create a function to take the variables and plot (in MATLAB) the difference. This function can be called at the model terminate callback.

Più risposte (0)

Categorie

Scopri di più su Simulink in Centro assistenza e File Exchange

Prodotti

Release

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by