Since Matlab itself is not open source (commercial software and Matlab language can only be used within the Matlab environment), is it OK to put my Matlab code on github under open source license, e.g., MIT or GPL?


Yes it is fine to release your Matlab code under a FLOSS license, althought not GPL but you can use LGPL, Apache 2.0 or BSD licenses. Choose depending on your purposes for the code.

The Free Software Foundation advises to use LGPL for libraries which will be used along with nonfree software or Apache 2.0 if for some reason you don't require strong copyleft protection on your code or if it is a very small program. Read FSF's license recomendations

Mathworks for example requires BSD licensing for code to be released in their File Exchange. Read Mathworks' TOS

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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