Is it possible to put a compiled standalone executable on a datastick?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
John Culling
el 7 de Sept. de 2020
Comentada: John Culling
el 15 de Sept. de 2020
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 comentarios
Mohammad Sami
el 8 de Sept. de 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.
Respuesta aceptada
Rik
el 7 de Sept. de 2020
Editada: Rik
el 7 de Sept. de 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 comentarios
Rik
el 8 de Sept. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!