MATLAB: Is it possible to put a compiled standalone executable on a datastick

dllMATLAB Compiler

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.

Best Answer

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.