simulink tout sample time and to workspace block

20 ビュー (過去 30 日間)
Robert Scott
Robert Scott 2023 年 12 月 10 日
回答済み: Paul 2023 年 12 月 11 日
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 件のコメント
Robert Scott
Robert Scott 2023 年 12 月 10 日
i should also mention there is a mix of triggered subsystems and regular subsystems

サインインしてコメントする。

回答 (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 Center および File ExchangeSources についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by