Best practice to add license text to matlab code.
Show older comments
Hi!
I have been working on some Matlab code recently and I would like to publish it under some open source license. If I were programming in C, I would just add the license text as a comment at top of each file. However, Matlab considers the first comment to be the documentation. Thus, I can't really put it there because nobody will be able to lookup what the function does. In GNU/Octave I could do this, because it ignores the first comment if it starts with the word "Copyright". So my question is: What's the best way to add an open source license text to Matlab code? Should I put it below the help comment? If I remember correctly, it is, at least for the GPL, recommended to put the notice on top of each file. Or should I place it in a separate file exclusively and not in each individual m-file?
Thanks for your suggestions, Laurent
Accepted Answer
More Answers (0)
Categories
Find more on Install Products in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!