Customize dbstop in MATLAB
If you use the editor, you can set a stop as normal, right-click on it, select “set/modify condition” and enter the condition (the stop will turn from red to yellow). From command line, you can use dbstop in file if expression dbstop in file at location if expression e.g. dbstop in myFile at 200 if … Read more