simulink tout sample time and to workspace block

7 vues (au cours des 30 derniers jours)
Robert Scott
Robert Scott le 10 Déc 2023
Réponse apportée : Paul le 11 Déc 2023
I am running a simulink model and looking at the "out" variable produced by the simulation.
Inside the out variable that gets pushed to the matlab workspace at the end of a simulation there is a variable called tout.
That appears to have some discrete time step of when its sampling data.
for example
the tout variable is an array and inside of it its a 30 second time stamp
etc etc etc
I am using some a block called "to workspace" which is taking some signals in the model and putting them in my workspace also
The data collected from the to workspace block apparently is sampled at these 30 second intervals.
How do i change the interval time? I dont want the data to be sampled at 30 seconds. I want it to be sampled at 60 seconds for example
  1 commentaire
Robert Scott
Robert Scott le 10 Déc 2023
i should also mention there is a mix of triggered subsystems and regular subsystems

Connectez-vous pour commenter.

Réponses (1)

Paul le 11 Déc 2023
By default, the tout variable is updated at every major time step of the solver. The defaults, including the variable name and whether it's even output at all, can be controlled by the parameters on the pane Modeling -> Model Settings -> Data Import/Export.
The data collected from the To Workspace block is collected in accordance with its Sample Time and Decimation and Limit Data Points to Last block parameters.




Community Treasure Hunt

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

Start Hunting!

Translated by