mfilename in nested functions
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Daniel Shub
il 15 Nov 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
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!