Documentation Center

  • Trials
  • Product Updates


File name of currently running function


p = mfilename('fullpath')
c = mfilename('class')


mfilename returns a string containing the file name of the most recently invoked function. When called from within the file, it returns the name of that file. This allows a function to determine its name, even if the file name has been changed.



More About

expand all



When called from the command line, mfilename returns an empty string.


See Also

| | | |

Was this topic helpful?