simulink tout sample time and to workspace block

14 Ansichten (letzte 30 Tage)
Robert Scott
Robert Scott am 10 Dez. 2023
Beantwortet: Paul am 11 Dez. 2023
Hello
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
0
30
60
120
150
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
Thanks
  1 Kommentar
Robert Scott
Robert Scott am 10 Dez. 2023
i should also mention there is a mix of triggered subsystems and regular subsystems

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Paul
Paul am 11 Dez. 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.

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by