Azzera filtri
Azzera filtri

Simulink S-Function output ports with scope

1 visualizzazione (ultimi 30 giorni)
Marvin Klatte
Marvin Klatte il 27 Dic 2020
Risposto: Jesús Zambrano il 27 Dic 2020
In my Simulink model there are two Input ports for my S-Function (.m-file). After calculate S-Function in have one Ouput vector. I would like to see this Vector in a scope. What do i need to change in my S-Function matlab script to get the Output in Simulink again?

Risposte (1)

Jesús Zambrano
Jesús Zambrano il 27 Dic 2020
If I understood the question, when you say "get the Output in Simulink again" would mean: you would like to save in a vector so to get access to the data post-simulation, correct? If so, there are different ways, for example:
  • Connect the S-function output to a block "To File" or "To Workspace" (you can find it in the Library Browser, section Sinks)
  • Connect the S-function output to an Outport (you can find as Out1 in the Library Browser, section Sinks), then go to the Config. Sets of the model, section Data Import/Export, and select 'Output' checkbox.
Hope it helps!

Categorie

Scopri di più su Block and Blockset Authoring in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by