Borrar filtros
Borrar filtros

mfilename in nested functions

2 visualizaciones (últimos 30 días)
Matlaboscope
Matlaboscope el 15 de Nov. de 2011
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.

Respuestas (1)

Daniel Shub
Daniel Shub el 15 de Nov. de 2011
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

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by