Break a code in intermediate function
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Marcelo Sena
am 24 Jan. 2015
Kommentiert: Sean de Wolski
am 26 Jan. 2015
Hi, I am trying to break a code in an intermediate function of the whole procedure I am running. For example, I run "my_script.m" which calls an intermediate function "my_function.m". I would like to break/pause the code at line 15 of "my_function.m". It is basic programming feature, but (surprsingly) couldnt do it or find quick instructions in the internet. I am grateful for any help. Thanks.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 24 Jan. 2015
Would the pause function do what you want? Also, see the list of related functions at the end of that page.
3 Kommentare
Star Strider
am 25 Jan. 2015
My pleasure.
What do you want to do with the paused code? What do you want to do at Line 15 of "my_function.m"?
If you want to examine or change a variable, another option is inputdlg and its friends (listed in and at the end of that page). One benefit of inputdlg is that it and its friends don’t clutter the Command Window.
Weitere Antworten (1)
Sean de Wolski
am 24 Jan. 2015
Bearbeitet: Sean de Wolski
am 26 Jan. 2015
>>dbstop in my_function at 15
Or click the - next to the line number in the editor. Doc:
>>web(fullfile(docroot, 'matlab/matlab_prog/debugging-process-and-features.html'))
3 Kommentare
Siehe auch
Kategorien
Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!