5

I know, the general answer will be yes, but here is my situation.

I got a plotting function from one MATLAB's toolbox and modified its m-file to draw what I need. Eventually this function became a part of program I would like to distribute as an open source (or under other license). Can I do this? Well, may be it was not wise to create a function in such a way, but I didn't think about distribution at that time. The function still depends on other functions in this toolbox, so a potential user supposed to have a license for it.

Any thoughts, recommendations?

Have you ever modified MATLAB's m-files directly?

3
  • If you don't control the copyright of part of the code, you don't get to set the terms for using it...but as always, go ask a lawyer. Mar 18, 2010 at 18:08
  • Alternatively submit your code to Mathworks and your enhancement might get incorporated in the next release of the toolbox.
    – Adrian
    Mar 19, 2010 at 12:30
  • 4
    I'm voting to close this question as off-topic because it is about licensing or legal issues, not programming or software development. See here and here for details, and the help center for more. Jun 16, 2015 at 17:15

2 Answers 2

5

This issue is sometimes dealt with by you not distributing the code but rather a diff that can be used to turn the copyrighted code into your code.

4

Based on a brief look: it seems that the Mathworks assert copyright in the code that they publish in m-files in their toolboxes -- it would be very suprising if they didn't. That kind of rules out your making minor modifications to their files and then publishing them at all without explicit permission. It probably also rules out you making major modifications and passing the work off as your own and publishing it.

But this is the sort of area where you might want to get legal advice.

Much better approach is to write your own m-files to use Mathworks code 'as-is', writing wrappers or auxiliary functions if their code doesn't do exactly what you want.

Not the answer you're looking for? Browse other questions tagged or ask your own question.