MATLAB Answers

Matlab executable not running on remote access files

22 ビュー (過去 30 日間)
Daniel Berveiller
Daniel Berveiller 2021 年 1 月 14 日
コメント済み: Daniel Berveiller 2021 年 1 月 20 日
Dear folks,
I work on Windows 10 Pro. Version of Matlab is 2017b. I'm using the matlab compiler to generate an executable file from a script. This exe file is used to treat some files locally, on the same machine where Matlab runs.
I would like to change the directories for reading and writing theses files. The files would be read and write on a NAS.
I did it and it works when I run the script manually with Z as the letter of my remote network disk. I also tried to put directly the IP adress in the script and it works fine. (I do not know how Matlab manage the login and password, it seems it uses the windows library to find it ?!?).
But when I compile this well working script to create an .exe file, the exe file does not work. I tried to find similar issue on the forum but did not succeed.
Any help would be welcome,
All the best

  0 件のコメント

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

回答 (3 件)

Image Analyst
Image Analyst 2021 年 1 月 14 日
You can try the FAQ:
If none of those ideas work, then you might have to call tech support.

  0 件のコメント

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


Daniel Berveiller
Daniel Berveiller 2021 年 1 月 15 日
Thank you for the quick reply. But I'm not sure it concerns my problem.
The application is running on the computer where Matlab and compiler are isntalled. Only files are located on a remote location. And this remote location is not a PC but a storage where no application can be installed.
What is complicated is that I cannot know what is hapenning since I do not have error message when I run the exe.

  0 件のコメント

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


Bruno Luong
Bruno Luong 2021 年 1 月 15 日
編集済み: Bruno Luong 2021 年 1 月 15 日
"I would like to change the directories for reading and writing theses files."
IIRC the cd command is non effective in deployed (I might be wrong though).
You should use fullpath of files to open them.

  2 件のコメント

Image Analyst
Image Analyst 2021 年 1 月 15 日
The cd command does work in compiled apps though the compiler warns you against it. The FAQ also warns against it and recommends fullpath():
fulpath() is ALWAYS the way to go when saving or reading files from different folders than the current folder.
I have heard of problems in the path when using OneDrive cloud drives, but not sure of the reason or resolution.
Daniel Berveiller
Daniel Berveiller 2021 年 1 月 20 日
Ok thank you. I'm going to try this.

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by