Change specific simulation time in Simulink

Hello,
I have been working on a simulink model and the simulation works perfectly.
I wanna add a new block to the simulation, which only runs for a specific time. So lets say I run the simulation for 10000s, I only want the new block to run from 2000-4000.
Is this possible? And is there a way I can make a specific block start after some seconds?
Your Sincerly

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 13일

0 개 추천

You can use the block If-Then-Else Blocks

댓글 수: 5

But I tried to put a variable called simulation_stop_time and im changing that variable in a matlab script. But how do I access this simulation time while it runs? I tried to make a matlab function like this:
if simulation_stop_time > 1000
signal_out = 1
else
signal_out = 0
end
But since I gave this variable a value, it doesnt change. But how do I access the variable that goes from 0 - simulation_stop_time?
Aint it possible to use this value somehow?
Where did you put this function? There is no start time and stop time for each block
Kalle
Kalle 2014년 7월 13일
I put it in simulink. I can't really see how I can explain it better. It should be a basic question.
Let's say I put a transfer function in a model and run it for '' 10000'' and put a scope to see the output. Now I want to add a disturbance that should only run for 1000-2000. Is this possible? I want to access the increasing simulation time.
When there is no disturbance signal, we can consider it as equal to zero. Instead of telling: I will run a disturbance from 1000 to 2000, just set your disturbance signal to zero wherever you want
Haha LOL gud answer :)

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

카테고리

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

제품

태그

질문:

2014년 7월 13일

댓글:

2021년 1월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by