Pulling from continuously changing variable every x seconds

조회 수: 1 (최근 30일)
Katarina Vuckovic
Katarina Vuckovic 2020년 4월 10일
답변: Guru Mohanty 2020년 4월 14일
I have a "ramp source" as an input to a function. The input is changing to fast for the tasks within the function. Therefore I was to "pull" the ramp input value every x seconds and use that value as an input for the function.

채택된 답변

Guru Mohanty
Guru Mohanty 2020년 4월 14일
I understand you want to take data from the ramp source in a specific time interval. To do this a Pulse generator and a Sample & Hold block is required. In the pulse generator you can set the time interval in which you want to pull the data. And the Sample & Hold gives value of the ramp source at a specific time.
I have attached a sample Simulink model for it.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by