MATLAB: How to get the filename of a running script

i intend to implement the filename of the running script into the print of the resultsMATLAB

Matlab script

Best Answer

For example, you can include into your m-file the following command:
myName= mfilename
Then variable myName, will contain a string with the name of the file.
Related Question