필터 지우기
필터 지우기

simulink tout sample time and to workspace block

조회 수: 12 (최근 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 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