Is it possible to put a compiled standalone executable on a datastick?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Mohammad Sami
le 8 Sep 2020
If your existing code is mostly in form of functions, you may only have to redo the GUI and then wire in your callbacks.
Réponse acceptée
Rik
le 7 Sep 2020
Modifié(e) : Rik
le 7 Sep 2020
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 commentaires
Rik
le 8 Sep 2020
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!