Feed the velocity signal into a Compare to Zero block. The output of the block will change from 0 to 1 when the velocity becomes less or equal to zero. You can then connect the output of that block to the Stop Simulation block.
HTH,
Arnaud
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!