How to change the simulation time online based on some condition.

7 views (last 30 days)
Hello,
I want make the simulation stop when a particular condition is met (such as when the distance between two robots reached some value). is there any block in the simulink to do that?.
Thanks in advance

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 19 Feb 2021
Edited: KALYAN ACHARJYA on 19 Feb 2021
This way?
function like
condition=....%Initialise false
while ~condition
% Model Run
% Codition Update
end

Categories

Find more on Simulation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!