Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
When working with long loops of processing one may need to set a breakpoint to stop on a particular condition. While Matlab's built in conditional breakpoints achieve this, they exact a heavy performance penalty (even when disabled!), and are not generally maintained between sessions. dbstopif is inserted as a single line of code which which, if the condition is true, sets a regular breakpoint on the following line, resulting in an immediate dbstop.
A comparison of the time to execute a loop with many iterations:
Matlab conditional breakpoint enabled: Elapsed time is 34.412000 seconds.
dbstopif: Elapsed time is 0.004994 seconds.
Disabled:
Matlab conditional breakpoint disabled: Elapsed time is 51.132263 seconds.
dbstopif: Elapsed time is 0.004941 seconds.
Matlab conditional breakpoint removed: Elapsed time is 0.004422 seconds.
dbstopif: Elapsed time is 0.004628 seconds.
Citation pour cette source
Dan K. (2026). dbstopif(condition) (https://fr.mathworks.com/matlabcentral/fileexchange/62969-dbstopif-condition), MATLAB Central File Exchange. Extrait(e) le .
Informations générales
- Version 1.0.0.0 (981 octets)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.0.0.0 |
