How can my code know if it iss called from the base or from some other function?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Rik
2018년 5월 31일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!