Change specific simulation time in Simulink
Ältere Kommentare anzeigen
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
Antworten (1)
Azzi Abdelmalek
am 13 Jul. 2014
0 Stimmen
5 Kommentare
Kelvin
am 13 Jul. 2014
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?
Azzi Abdelmalek
am 13 Jul. 2014
Where did you put this function? There is no start time and stop time for each block
Kalle
am 13 Jul. 2014
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.
Azzi Abdelmalek
am 13 Jul. 2014
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
Omar Al-Khatib
am 22 Jan. 2021
Haha LOL gud answer :)
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!