mfilename used in ".mlx" does not appear to be the desired path?

4 次查看(过去 30 天)
To get the full path and filename of the run in ".mlx", I used the mfilename function, but the full path of the file returned is not what I want.
How can I fix this please? Thanks in advance
p = mfilename('fullpath')
'/tmp/Editor_rdmrf/LiveEditorEvaluationHelperEliveEditorEB64F562'
But using it in the ".m" file is the result I want
  1 个评论
Walter Roberson
Walter Roberson 2021-10-29
mfilename cannot be made to work for this purpose due to the way that mlx are implemented.
There are posts showing how to get the mlx name. It is a bit of a nuisance.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by