Function running in batch() cannot find .mat file that is in MATLAB path

1 回表示 (過去 30 日間)
Andrew Harris
Andrew Harris 2015 年 8 月 11 日
回答済み: Andrew Harris 2015 年 8 月 12 日
I am attempting to run a function file in a batch, and the batch has no problem finding all the additional functions in the folder that has been added to the MATLAB path, but it can't find a .mat file in the same folder and load it, even when I specify 'AdditionalPaths' when calling the batch(). Has anyone else experienced this, and is there a work-around that will allow me to load a .mat file in the batch()?
  2 件のコメント
Edric Ellis
Edric Ellis 2015 年 8 月 12 日
Which cluster type are you using?
Andrew Harris
Andrew Harris 2015 年 8 月 12 日
編集済み: Andrew Harris 2015 年 8 月 12 日
Just the local cluster, but you clued me in to a possible source of the error: I didn't explicitly define the param-value pair 'Profile', 'local'. Let's see if that fixes it.
Sadly, no joy.

サインインしてコメントする。

採用された回答

Andrew Harris
Andrew Harris 2015 年 8 月 12 日
It turns out that the 'AdditionalPaths' value can't just be the pathdef value, it must explicitly define the path on which the file resides. Hope this helps someone in the future.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClusters and Clouds についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by