I want my input signal only two run for a specific time say from [5 sec to 20 secs ] when my simulation time is 100 secs,, is there any way to do this

답변 (1개)

Pavan Guntha
Pavan Guntha 2021년 3월 25일

0 개 추천

You may try to solve using the following steps:
1) Use clock block to get the current simulation time.
2) Append a combinational logic to actually compare current simulation time with your time of interest.
3) Use an enabled subsystem to appropriately route the signal to output with output signal of step 2 as control signal to this block.
Here's an illustration of these steps:
As depicted in the scope, the signal (here sine signal is taken as an example) is routed to the output only in the time slot of interest.

댓글 수: 2

NIHAD MOHAMED ALI
NIHAD MOHAMED ALI 2021년 3월 27일
how do i invoke this >=5 or <=20 blocks?
Pavan Guntha
Pavan Guntha 2021년 3월 29일
You can refer to the compare to constant block documentation for more details.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

질문:

2021년 3월 11일

댓글:

2021년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by