Is it possible to put a compiled standalone executable on a datastick?
1 回表示 (過去 30 日間)
古いコメントを表示
Due to Covid-19, I am looking at ways of conducting psychological experiments that are usually done in a laboratory using MATLAB outside that context.
One way to do this would be to distribute an executable version of the MATLAB program to participants to run on their own computers at home.
I have looked at the compiler, but it seems only to be able to produce a package that has to be installed by the user. This seems to ask a lot of potential participants, int that they have to install it then run the program, then uninstall it. Is there any way to get all the required resources - DLLs etc.- into one folder so that it can be distributed and used conveniently, say on a datastick.
4 件のコメント
Mohammad Sami
2020 年 9 月 8 日
If your existing code is mostly in form of functions, you may only have to redo the GUI and then wire in your callbacks.
採用された回答
Rik
2020 年 9 月 7 日
編集済み: Rik
2020 年 9 月 7 日
You have several options (feel free to add options if you have editing privileges, otherwise post a comment):
- Compile to a standalone executable with Compiler. This will require installation of the runtime (or the presence of Matlab), wich you can include or allow users to download it separately.
- Use Coder to generate C or C++ code, which you should then be able to compile to a stand-alone executable.
- Compile your code to a web app, as suggested by Mohammad Sami.
- Use GNU Octave instead of Matlab. This will very likely hurt performance (especially on Windows), require rewriting code to some extent (probably including re-compiling the DLLs you mentioned), and (depending on your taste) reduce how nice your GUI looks unless you recreate much on your own. Despite these downsides the GPL license means you can probably distribute the entire portable (zip) version along with your own code as a ready-made one-click solution.
2 件のコメント
Rik
2020 年 9 月 8 日
I don't know about the audio alternatives. Generally the documentation will state at the bottom if it allows code generation.
And Octave works just fine of windows as well. Getting it to work on a Mac isn't hard, but you won't have a portable executable anymore. At least not that I know of. You are correct that bugs tend to stick around longer on windows.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!