How can my code know if it iss called from the base or from some other function?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Micke Malmström
am 31 Mai 2018
Kommentiert: Micke Malmström
am 31 Mai 2018
I want my "figure formatting function" to copy the current figure if it is called from "base"-workspace but not if it is called from another function or script. How can I add this functionally to my "figure formatting function"?
thanks
0 Kommentare
Akzeptierte Antwort
Rik
am 31 Mai 2018
With the dbstack function you can get the calling functions. Be aware that some releases have a function that is called to run a section, while older releases just return an empty struct.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!