필터 지우기
필터 지우기

mfilename in nested functions

조회 수: 2 (최근 30일)
Matlaboscope
Matlaboscope 2011년 11월 15일
how to output the name of a nested function when it is run. the built-in function mfilename outputs the top function not the nested ones.

답변 (1개)

Daniel Shub
Daniel Shub 2011년 11월 15일
I think you can use dbstack to get the information. The easiest, although potentially hardest to maintain is to set the "function name" at the top of the function ...
function varargout = mytest(varargin)
functionName = 'mytest';
end

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by