MATLAB: How can i copyright a script in Matlab before i give it to someone else

copyrightscript

Hello ! I would like to know if somehow i can copyright a script that i have made. For example i made a script for an exercise that my professor asked but the other classmates ask me to give them my script. I spend too much time in order to finish this script and i want to help them but i am afraid that the professor will not understand my effort.
So is there any function or option that i can use in order to paste my name and the date in the script before i give it to anyone else ??
Thank you in advnace!

Best Answer

Copyright is a legal process. In countries which are members of the Berne Convention on Copyright, any "sufficiently creative" work is automatically copyright by the author at the time of creation, without any requirement to register the work or mark it as being copyrighted. However, in those countries, registering the work may entitle you to higher damages for copyright violations, and establishes proof of priority for legal purposes. But copyright registration takes money, and that money would have to be paid for each item registered.
If the point for you were to establish that you had authored the work and the others were copying you, rather than you copying them, then one mechanism would be to submit your work to the appropriate place before you allowed anyone else access to it (I'm presuming that your assignment submission process can timestamp submissions.)
What you are asking about is something that I think about from time to time and try to solve: How can I post solutions here to illustrate that something can be done, and to illustrate techniques, and yet force the other people to learn from it and adapt it rather than just copying it and submitting my work as their own?
For example is there some way I could write the material that would stand out to people marking assignments to show that the work was not the work of the students -- and even if there were, then how would I force it to be rejected by automatic marking programs that just pass parameters and look at responses without any human looking at the source? I do not think that any approach along these lines is practical, as to be effective there would have to be some kind of world-wide agreement by markers as to what the signal should be, and I do not think we can get that kind of agreement.
So maybe I should write the code with really bad variable names that no-one would use in practice. Perhaps full of underscores and 1's and lower-case L's, and O's and 0's, so that the code works but is too obscure for humans to easily keep straight which variable is which. Or perhaps full of insults or swear-words so any human marker would question what was happening. But if I did that, then I would not be comfortable with posting the code here.
Or perhaps I should encrypt the code somehow, so that it works at execution time but the markers who looked at it would have little idea of how it worked. But if I do that, then how would the student be able to study the ideas in the code?
Perhaps I need to put in some kind of license check, and issue license keys so that the code works for the student but fails on the marker's machine, and somehow make the license checks a nuisance to edit out, easier to rewrite the code...
Perhaps .... I don't know. Other ideas float through my mind from time to time. It is a difficult thing, to write code good enough to learn from and test out, but which the person is somehow forced to rewrite before submission...