Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How do I put a condition on stopping of breakpoint ?

1 vue (au cours des 30 derniers jours)
Tonu
Tonu le 6 Fév 2013
Clôturé : MATLAB Answer Bot le 20 Août 2021
Am using ode15s my t_span is from [0 2000], say I want to stop the simulation after 100 seconds ? This is just for an illustration , actually I want to put conditions on other variables in my codes.
Any help would be appreciated . Thanks, Tonu

Réponses (1)

Walter Roberson
Walter Roberson le 6 Fév 2013
dbstop in YourFunction if t > 99 & t < 101
(because we don't know if it will try to sample at 100 exactly )

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by