simulink tout sample time and to workspace block

8 次查看(过去 30 天)
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 个)

Paul
Paul 2023-12-11
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.

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by