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

조회 수: 5 (최근 30일)
cui,xingxing
cui,xingxing 2021년 10월 29일
댓글: Walter Roberson 2021년 10월 29일
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