PAUSING on function call - matlab
Mostra commenti meno recenti
I have a main matlab script that call functions, that call other functions, etc., etc. about 1000 functions in all.
I did not write it, but I would like Matlab to pause whenever a new function is called, and tell me the name of the function.
My objective is to develop a tree-diagram of all of the functions.
Is there a setting in the debugger, or preferences, anyway to do this automatically?
4 Commenti
Fangjun Jiang
il 10 Nov 2020
do you have the source .m code?
Rik
il 10 Nov 2020
There is a built-in dependency analyzer. You could probably also use the output that the profiler gives you.
You can also go another route: parsing your script on your own, using which to find out the file location of a function. You can probably use much of the code I wrote here.
Be aware that you are embarking on a very difficult task, depending on the functions involved.
Rand Dannenberg
il 10 Nov 2020
Rand Dannenberg
il 10 Nov 2020
Risposte (1)
Fangjun Jiang
il 10 Nov 2020
Modificato: Fangjun Jiang
il 10 Nov 2020
0 voti
The call of another function might be dependent on a particular condition inside this function. So it is not ideal or practical to watch/debug the actual execution of the M script in one case or a few cases to get the information.
What you are looking for is probably this.
6 Commenti
Rand Dannenberg
il 10 Nov 2020
Rand Dannenberg
il 10 Nov 2020
Fangjun Jiang
il 10 Nov 2020
Create a new project, add all the scripts the do the analysis
Rand Dannenberg
il 12 Nov 2020
Rand Dannenberg
il 12 Nov 2020
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!