Live scripts stored in MATLAB Drive are assumed to be located in Temp folder

4 ビュー (過去 30 日間)
Diaa
Diaa 2019 年 11 月 12 日
回答済み: Walter Roberson 2019 年 11 月 12 日
I have MATLAB R2019a on Win10 and MATLAB Drive Connector.
Some live scripts are stored in the local MATLAB Drive folder. However, running
fileparts(which(mfilename))
results in
'C:\Users\Diaa\AppData\Local\Temp\Editor'
instead of the expected output
'C:\Users\Diaa\MATLAB Drive'
So, how to fix this in order to be able to add the directories of the running live script folder and its subfolders to the search path using either
addpath(genpath(pwd))
or
folder=fileparts(which(mfilename)); addpath(genpath(folder));
?

採用された回答

Walter Roberson
Walter Roberson 2019 年 11 月 12 日

その他の回答 (0 件)

コミュニティ

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by