File name of currently running code
p = mfilename('fullpath')
c = mfilename('class')
mfilename returns a string
containing the file name of the
.m file in which
the function call occurs. When called from within the file, it returns
the name of that file. This allows a script or function to determine
p = mfilename('fullpath') returns
the full path and name of the file in which the call occurs, not including
the filename extension.
c = mfilename('class') in
a method, returns the class of the method, not including the leading
If called from a nonmethod, it yields the empty string.