How can I get the filename of a running script

22 views (last 30 days)
Matlab script

Accepted Answer

Dimitris Kalogiros
Dimitris Kalogiros on 25 Sep 2018
Edited: Dimitris Kalogiros on 25 Sep 2018
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.

More Answers (1)

Ernst Affeldt
Ernst Affeldt on 2 Oct 2018
The comment regarded the last answer

Products

Community Treasure Hunt

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

Start Hunting!