MATLAB: Mfilename not working on Live Editor

live editor

Hi. I'm using matlab 2016a. Inside a Live Editor script, I'm trying to get the script name, using the function mfilename, without any parameters, to get it. What matlab gives as an output is: MatlabEvaluationHelper.
I've tried to export this code to a classic matlab .m file, and seems to work fine. Any idea on what could be the problem? Thanks in advance

Best Answer

Hello Jaime,
I am afraid that mfilename does not function inside live scripts or functions. Our developers are aware of this feature request, and are considering possible resolutions for future releases of MATLAB.
Can you describe what you are trying to accomplish with "mfilename"? There may be other ways to get a similar workflow to what you desire.
-Cam