Stand alone apps for MAC
显示 更早的评论
I compiled a stand alone App for MAC. I installed it and tried to run. The application involves reading of some input data from data files. the app is always stuck and beeps because it can not find the datafiles although I placed them all together in the same location as app. The program script however runs fine and no errors. Have been trying to resolve this and even contacted tech support regarding this but no luck. Any help is appreciated. Thanks in advance.
3 个评论
Alexandra Harkai
2016-11-1
This is what I've found so far: How do I include a data file with my standalone executable generated with the MATLAB Compiler 4.0 (R14)?
I am about to do the same thing (only on Linux) so I'm curious to see how this works.
Pappu Murthy
2016-11-4
Alexandra Harkai
2016-11-4
Yep, first thing is to have slashes the proper way (had the same problem).
What solved the problem for me was two things:
1. When I run the executable, I first navigated to my (main) MATLAB directory.
2. I set all loading to be like this:
load('<full_path_from_MATLAB_directory>/datafile.mat')
So if my path is Documents/MATLAB/input_dir/input1.mat then I did
load('input_dir/input1.mat')
Loren's blog summarises the different practices well.
回答(1 个)
Keerthana Chivukula
2016-11-4
0 个投票
Additionally, refer to the following documentation link to manage required files in the compiled application: http://www.mathworks.com/help/compiler/adding-required-files-to-the-project.html
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Compiler 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!