How can a function find location of itself?

49 ビュー (過去 30 日間)
Micke Malmström
Micke Malmström 2016 年 6 月 13 日
回答済み: Walter Roberson 2016 年 6 月 13 日
I want to save a file in the same location as the a function (ie not in the current folder). How can a function find get the location of itself?
(the file should handle being moved around, additionally, it will always be in some PATH)

採用された回答

Walter Roberson
Walter Roberson 2016 年 6 月 13 日
together with fileparts() to extract the directory portion, and fullfile() to construct the new file name.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Name Construction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by