views:

197

answers:

6

That's basically it. I have some code in Matlab and I want to release it so anyone can make use of it. Also I'd like to prevent that the codes goes closed after me.

Q: Can I choose the GPL to license it? If not, what are my choices? (Apart from stop using Matlab, which I'm already considering)


EDIT

I just edit it because this is more accurate to my case. Sorry for the inconveniences.

Q: Is it advisable to use the GPL to release my Matlab code in order to make it evolve in the Community? If not, what would you choose instead?

A: 

Sure you can release your matlab code under GPL. Note however that people will need matlab to run it. But you can control your own code and release it under any license you wish.

dave
So, there is no special clause in the Matlab license agreement in which you have to release Matlab code some way they want?
Alejandro Cámara
No there's not. You're free to distribute your code any way you want.
Geodesic
Though I can release it under the GPL @Ben is right when he sais it wont really be a good thing. It will completely freeze my code since (virtually) nobody will be able to re-release it (not owning the redistribute right for the Matlab libraries). That's an important point, though you extrictly answer my question right. Thanks!
Alejandro Cámara
+2  A: 

Who owns the code? (If you were paid to write it, probably the person paying you - if it is a university or school project it could belong to them.)

I'm not aware of anything that makes Matlab code special that would prevent the release under the GPL.

JosephH
I'm paid to research, and as a result some code is produced. I don't think the university owns the code, though it owns my research results (but the authorship) and my soul.
Alejandro Cámara
I think I would definitely double check on that - do you have an actual contract that you can check? It would probably be wise to ask the opinion of someone at the university too.
JosephH
It wont hurt to check my contract, but I really doubt it says something about code. What I'm sure it wont give me money its patents... that's all for the univesity (like I'm making a patent ever).
Alejandro Cámara
You're right, it probably won't mention code directly - I'd look for other phrases like "work products", "deliverables", "IP" or "IPR", any mention at all of Copyright, and so on. For example in the USA if you fall under the "work for hire" category, I believe everything you generate is by default owned by the person paying you, unless a contract explicitly states otherwise.
JosephH
@JosephH: Literally "El investigador cede en exclusiva a <University> los derechos de explotación derivados de la propiedad intelectual, del trabajo que se desarrolle durante la ejecución del proyecto." ---slightly-translated---> "The researcher give exclusively to <University> the exploiting rights of the derivatives of the intelectual property of the work developed during the execution of the project". In other words, I'm screw... I've to call them because here everything is more relaxed (I believe) than in the US, but either way I don't want to find myself fired for something like this.
Alejandro Cámara
Yeah, that does look like a problem :-( However, do contact the university, explain any benefits you can of making it open source (their are other questions on stackoverflow that explain how to make the case for releasing things), and hope they will understand that their is little commercial value in the matlab script, so their any only advantages to them in releasing it. (Obviously if there does look to be commercial value than this isn't a good argument to use!)
JosephH
+2  A: 

Use GNU Octave.
Its about 95% syntax compatible with Matlab. and since the code is your creation, if there would have been any clause in Matlab's EULA preventing you from publishing your code under any license you want, you could always claim that it is Octave code, and not Matlab.

Ofri Raviv
I like the sugestion that it's Octave code, not Matlab's. The only thing is that I use (intensely) the image processing toolbox, and the code related to it (imrotate, iradon, etc.) probably wont work with Octave.
Alejandro Cámara
Try Octave forge packages, specifically the image package: http://octave.sourceforge.net/image/overview.html
Ofri Raviv
That sounds great, thanks! I've to check it out some day, because Matlab has many annoying things. But I'm too lazy to make the change :-|
Alejandro Cámara
A: 

@dave had it almost right.

After all, what is "code"? Text, you've written - either in Word or in a text editor. So basically, you can write it in your paper notebook, and publish it, under whatever terms you want.

Running it is however a different story - so be careful not to, or at least mention it, that you do not own/copyright any rights to MATLAB functions, and so on ... legal mumbo jumbo goes here ...

Rook
Thanks for the answer, but this have the same downfall as @dave's. See @Ben's answer for more information.
Alejandro Cámara
+1  A: 

While you the copyright holder can definitely choose to make your code copyable under the GPL terms, that may not have the desired effect. The GPL requires anyone who redistributes your code or derivatives thereof to include source code not only for your code but also for any libraries it is linked to, which might mean that others have to redistribute the Matlab source code in order to copy yours, which of course they couldn't do, so in that case it would be the same as giving use rights and no copying rights. Not saying this is the case, not saying it isn't, it really would take a bunch of lawyers to sort it out (and in the end only the lawyers would profit).

Ben Voigt
Sounds reasonable. Are you aware of any other license that shares the GPL philosophy and do not force you to redistribute the source code of the libraries you use? I believe that would be the answer to my problems.
Alejandro Cámara
LGPL requires that source code be provided for the piece you wrote and any improvement to it, but not for other parts of the system.
Ben Voigt
Nice! I think that covers all I want! That's the only major difference with the GPL? Or should I be aware of anything else?
Alejandro Cámara
I don't think you are right. The code is not *LINKED* to Matlab code. It is run by a Matlab interpreter. The fact that Matlab is needed to run the code does not make it a part of the same program. (If you were right, It wouldn't make any sense to license any MS-Windows (or any other closed source OS) targeted code under the GPL.
Ofri Raviv
Hmm, that also makes sense. From http://www.gnu.org/licenses/gpl-faq.html#NonFreeTools I see that you have to link, and in this case there's no linking, only calling standard Matlab functions, that in any case can be overriden by custom GPLed ones!
Alejandro Cámara
@Ofri: MatLab uses a just-in-time compiler, it is not safe to assume it is interpreted. Your counter-example is also worthless since the GPL contains a specific exemption for libraries provided with the OS.
Ben Voigt
In any case, if in the future I'll be using third-party libraries that are not GPL, the LGPL is the best solution. (I still have to talk with the university to ask for licensing permision).
Alejandro Cámara
+2  A: 

Since you changed the question, I'm postings another answer:

Use BSD license.

Reasons:

  1. Its simple and short.
  2. Mathworks has chosen BSD as a mandatory license for code in its code exchange repository - Matlab Central

Note, that it does not contain Copyleft, so your code could be closed in the future.

Ofri Raviv
Thanks again for answering! I've read the license and I don't like that anyone can use my code to develop a tool I will be charged for later. Even if I weren't charged, I like it more when it's free (as in freedom). I'll think about it just to be able to publish my code in Matlab Central, but I don't think the benefits from it surprass the loss of freedom :-(
Alejandro Cámara

related questions