Does MW own copyright on C code generated by Matlab?

28 views (last 30 days)
The recent release of Matlab version 2011a has a new code generation product called Matlab Coder. It is a new product which generates portable C/C++ code directly from Matlab code.
Its license fee is already covered by the site-license from my university. Lets say the C code works as I think, can MathWorks claim copyright on: 1) the C code generated from Matlab code, or 2) tools that based on that piece of C code?
If finally everything written in Matlab can be transformed to C/C++ code, and it works, then the final code will be not only faster but also freely available to anyone including those who do not have Matlab installed? Am I too optimistic?
Link to some 1-2 mins 'Apple style' advertisements: http://www.mathworks.com/products/new_products/latest_features.html
Jian

Accepted Answer

Mike Hosea
Mike Hosea on 21 Apr 2011
I don't have anything to add to the legal answers above.
Technically, however, you'll find that the things that are supported for code generation using MATLAB Coder are application-oriented. With a few lines of MATLAB code you can generate a self-contained library that computes the eigenvalues of a matrix, but there's no supported "interpret and execute MATLAB code" function to compile with MATLAB Coder. To create a MATLAB-like application (even if the license permitted it) you would have to write your own interpreter in MATLAB code and then compile it.
  1 Comment
Jian
Jian on 20 May 2011
Thanks for all your detailed answers! Really appreciated!
You are right on the issue that Matlab coder might not be able to support all the transformation automatically at the current stage, otherwise, we will have a "C/C++" version of the entire Matlab. :)

Sign in to comment.

More Answers (3)

Arnaud Miege
Arnaud Miege on 21 Apr 2011
I suggest you have a read of C:/Program Files/MATLAB/R2011a/license.txt or the corresponding file for your installation (accessible from the help browser under Help -> Terms of Use). Here are a few snippets:
"2. USER CREATED FILES. This Addendum does not apply to MATLAB code files, MDL-files, MEX-files, MAT-files, VHDL-files, Verilog-files, FIG-files and P-files that are created by Licensee and that do not include any code obtained from MATLAB code files, MAT-files, P-code, MDL-files, C/C++ files, VHDL-files, Verilog-files, TLC-files, or other Source Code files supplied with the Programs ("User Files"). Licensee may distribute, sublicense, and resell without restriction, User Files."
"5.1. MathWorks Coder Programs. MathWorks provides directories of C, C++, Assembly, linker command files, template makefiles, project files, and TLC source code files with Programs that implement the real-time framework. Such files made available in any of the MathWorks Coder Programs may only be modified and deployed in Source Code or Linked Object Code form for different development targets when used with such Programs or with code generated by such Programs as part of, and only as required by, a larger Standalone Application. MathWorks Coder Programs cannot be used to create an Application (a) providing scripting capability similar to the capabilities of any of the Programs; (b) providing functionality or behavior similar to that of the MATLAB command line; (c) allowing operation of the code generation capabilities of Programs; or (d) providing access to an entire Program or a substantial portion of a Program.
5.1.1. Licensee may copy and deploy these files outside of the Programs in Linked Object Code form or Source Code form, if only used in combination with code generated by those Programs as part of a larger standalone Application.
5.1.2. No further fees shall be due to MathWorks for such deployment within Licensee's Application, regardless of whether the Application is deployed solely for Licensee's Internal Operations or to Third Parties."
etc...

Walter Roberson
Walter Roberson on 21 Apr 2011
Copyright laws depend upon jurisdiction. A reference jurisdiction would be required to start answering this question, and someone experienced with copyright in that jurisdiction would be required, as copyright in practice ends up involving a lot of "case law" (legal precedence.)
As a general statement: it is often an element of copyright law that the work be "an original expression of an idea". Some jurisdictions do not recognize mechanically generated items as being copyrightable (but they might recognize the input settings as being copyrightable.) Other jurisdictions do recognize mechanically generated items as being copyrightable.
If you already have R2011a, then I recommend that you bring up the help document browser to display any page, and then at the bottom of the displayed page, click on the link about copyrights or "terms and conditions", and read the licenses that show up. For example, I do not have that product, but in R2008b the license terms for the equivalent product show up even with basic MATLAB. In R2008b, Mathworks disclaims copyright of generated programs... which is a different legal matter than whether they could have claimed copyright if they had wanted to.
  1 Comment
Jian
Jian on 20 May 2011
What I heard on a recent webinar on Matlab Coder is: " the C/C++ code is generated from the Matlab code you wrote. Your copyright is on the code written by yourself, but not the language you chose. "
It makes sense to me, since the generated C code is open source, and given that I wrote the matlab code at the first place, I could have written the C code by myself.

Sign in to comment.


Tobias Elmøe
Tobias Elmøe on 11 Oct 2011
Sorry for reviving an otherwise very old thread. I am hoping someone can clarify if this means that you cannot develop MEX files based on Matlab Coder, which are called from a user generated script for Matlab (m file) for third party?

Community Treasure Hunt

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

Start Hunting!