Distributing MATLAB code to a company without a MATLAB lisence

5 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2012-7-19
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.

更多回答(1 个)

Bill Chou
Bill Chou 2012-7-25
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

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by