Distributing MATLAB code to a company without a MATLAB lisence

15 views (last 30 days)
I have written MATLAB code (at a university) for a company that does not have a MATLAB license.
Is there a way to give them this code without them having a license. If not, I will have to spend a lot of time translating the code to c++ (it is a lot of code...).
I've seen the MATLAB compiler, but I'm not sure if that would work or not..
Thanks.

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jul 2012
Mathworks does not copyright the programs that you write in MATLAB.
The copyright owner of the program (possibly you, possibly not if it could be deemed a "work for hire") can distribute the source code to anyone the copyright owner deems fit (within the boundaries of court orders, international treaties, national secrecy orders, and so on.)
The MATLAB Compiler is a tool that is able to convert the majority of MATLAB code into an executable program (corresponding to the MATLAB engine) and some encrypted data files (a pre-parsed version of the source code) that can execute the MATLAB source. If you build such a package using MATLAB Compiler, you may distribute it as you see fit (within the boundaries of [etc]).
Major limitations of the Compiler: the symbolic toolbox cannot be compiled; and most of the interactive design tools may not be compiled (but their results can be used.)
The human-readable source-code is not visible in the compiled code. You can distribute it if you see fit.
There is also MATLAB Coder, which is able to compile a restricted subset of MATLAB into C or C++ code. There are a fair number of portions of MATLAB which cannot be converted by the Coder at this time.

More Answers (1)

Bill Chou
Bill Chou on 25 Jul 2012
As Walter mentioned, MATLAB Coder may be an option for you to pass along your MATLAB code as C code. You can find the list of supported function here:
And here's a useful guide to get started with MATLAB Coder:
Hope this helps!
Bill Chou, MathWorks

Categories

Find more on Get Started with MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!