Distributing MATLAB code to a company without a MATLAB lisence

6 vues (au cours des 30 derniers jours)
matlab user guy
matlab user guy le 19 Juil 2012
Commenté : Jansy Rani le 22 Août 2021
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.

Réponse acceptée

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

Plus de réponses (1)

Bill Chou
Bill Chou le 25 Juil 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

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by