I'm not too sure about what you are asking but anyway...
You can compile Matlab programs and run them, you need the add-on Matlab compiler (
https://www.mathworks.com/products/compiler/index.html), to compile the program, to run it on any machine you need to install the matlab runtime (it's a self-executable so no big problems in installing it (
https://www.mathworks.com/products/compiler/mcr/index.html).
Code might need to be retouched in order to make it compile properly and there were some Matlab codes that couldn't be compiled, but this happened to me almost 4 years ago, so I guess now it should work perfectly for any Matlab code.
Good luck.