MATLAB: Can I turn C++ code from MATLAB Coder into a commercial application

cMATLABmatlab coder

Hi,
I'm new to some MATLAB tools and I want to know if i can turn C++ code generated with MATLAB Coder into a commercial application (just using the generated C++ code). For example, if i build and train a deep learning model in MATLAB and then i turn that model into C++ code and develop a C++ RESTful API to wrap that deep learning model, or integrate the generated code into a hardware.
Can i do this just by using MATLAB Coder or i need to pay for some additional feature? Note that i want to use just the C++ code generated using MATLAB Coder. After the code generation, theoretically my application would have nothing more to do with MATLAB.
I'm asking this because MATLAB Compiler and MATLAB Coder are similar products to me, being the Compiler a more complete and robust solution to distribute complete MATLAB apps and being Coder "just a source code generator" to be integrated into other apps, maybe with other different languages.
Thanks!

Best Answer

  • If you have a standard license, then you can deploy the code in your commercial projects at no extra charge. The MATLAB coder's overview page https://www.mathworks.com/products/matlab-coder.html mentions this:
    Deploy Algorithms Royalty-Free
    Use any C/C++ compiler to compile and run your generated code on any hardware, from desktop systems to mobile devices to embedded hardware. The generated code is royalty-free—deploy it in commercial applications to your customers at no charge.
    However, the terms of other license types explicitly mention that no commercial use is allowed, so this description does not apply to them.