build a standalone application from Matlab code

孤者浪人 提交于 2019-12-05 16:39:06

I think you're getting caught up on the attraction of the .exe file. If your goal is IP protection, then the .p code suffices. If your goal is to have a .exe file, then it's not simply IP protection.

Others have already stated that the documentation is simple and straightforward. Here is a very simple step-by-step example for creating a compiled example, using the Matlab compiler. Keep in mind you need to buy the compiler or at least use the trial version if you want to see how it is done.

You don't have to deploy a standalone application to protect your code: you can generate a P-code file from your M-files, which is a way to obfuscate source code.

Mathworks offers a toolkit ($$) in order to compile your MATLAB programs into an executable (.exe) file that can run without a MATLAB license on any computer with the Matlab Compiler Runtime (MCR).

So the flow would look like:

  1. Develop MATLAB application (set of m files)
  2. Create simple matlab script to utilize Matlab compiler (e.g. make.m)
  3. Run the make script to create MyApplication.exe
  4. Deploy MyApplication.exe and Matlab Compiler Runtime (MCR) to your users

Details can be found on the Mathworks website.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!