Am I allowed to write functions that have names of matlab functions (copyright)?

20 Ansichten (letzte 30 Tage)
Hello everyone,
I am not really well versed when it comes to copyright laws. My question is, am I allowed to write a function and give it a name that exists as a Matlab function, for example from a toolbox? Am I allowed to share said functions?
I know that the code within a Matlab supplied function is copyrighted and is property of Matlab, but does this hold also for the names of the functions? For example, may i write my own function, which is called "mvnrnd.m"? Am I allowed to share such a function with someone else?
I can't imagine it would be, since I can have that function name in another coding language and i don't see how Mathworks can sue the other company for something so generic, but I prefer to ask anyways.
I am leaving aside the obvious coding issue if you have two functions with the same name.
  11 Kommentare
Boris Blagov
Boris Blagov am 25 Jun. 2018
If a staff member says that it is forbidden, I would trust them just because they said so, yes. Most probably they would point me to the correct paragraph of the agreemnet as well. I have not read the whole agreement in full, I did check the license (parts of it) and the program offering guide but I might have simply missed it.
Besides, I think there were some really good remarks and the post from Guillaume is really spot-on. Others have also given me ideas and shared their experience with similar situations and dealing with toolboxes. So I am happy and thankful for the help that I got. You could take away the "hazy" stuff and still have a lot of substance. For me at least.
Walter Roberson
Walter Roberson am 25 Jun. 2018
Mathworks does not permit its staff to give public interpretations of the license terms, except in the form of occasional "Solutions" posted under the Mathworks Support account. The correct avenue is to contact either Technical Support or Sales with specific scenarios.
Actual lawyers not working for Mathworks do not comment on these kinds of situations without a lot of talk about jurisdiction -- and talk about the difference between what the law says and what the case law is in that particular jurisdiction.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Guillaume
Guillaume am 25 Jun. 2018
Something that has not been touched on: while the name of a function is not copyrightable, the function API (function name + inputs and outputs) might be depending on your jurisdiction. As far as I know (I am not a lawyer), it's not copyrightable in the EU, but in the US the latest ruling is that they are (after an earlier ruling that they weren't).
This is very relevant for you as you are not just replicating a function name but the whole signature (if you are replicating a toolbox function).
  1 Kommentar
Boris Blagov
Boris Blagov am 25 Jun. 2018
Now that's something highly relevant. Thank you.
The more I read about this the more muddy the picture is. I think it's best not to do this just to be safe (leaving all the coding issues aside). Even though I am in the EU.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (4)

Jan
Jan am 25 Jun. 2018
There have been reports in this forum about cases, in which using the name of a toolbox function without having a license for this toolbox, caused an error during the folder is included in the path - before the function is used. So beside the legal issues, there could be a restriction in the software.
I've shared a larger program with another lab, which did not have the Signal Processing Toolbox. It was used in my code only for a Butterworth filter. I've rewritten a function to calculate the filter parameters from scratch without taking a look into the original function to be sure. Now I'm using this workaround:
function vargargout = myButter(varargin)
persisent butterFcn
if isempty(butterFcn)
if ~isempty(which('butter.m'))
butterFcn = @butter;
else
butterFcn = @local_butter;
end
end
[varargout{1:nargout}] = butterfcn(varargin{:});
end
function [Z, P, G] = local_butter(n, W, pass)
...
end
Now Matlab's version is used, if it is available, and my one otherwise. This does not compete with Matlab's Signal Processing Toolbox. But if I write replacements of all functions of this toolbox and offer it commercially, I'd expect troubles.
  1 Kommentar
Boris Blagov
Boris Blagov am 25 Jun. 2018
Bearbeitet: Boris Blagov am 25 Jun. 2018
Yes, I do this all the time. I am forced to use two computers to work on a code, one has no toolboxes at all, so I have a "switch" at the top of the code, that calls "free to use" functions with the same functionality if I am on computer 1 and use the toolbox if I am on computer 2.
However, reading the License agreement carefully I am not even sure this is allowed officially. I know it sounds absurd and I wouldn't expect troubles in general, but technically speaking, these functions (not written by me, having different syntax and all) are theoretically competing with the toolboxes that I have on one of the computers. Exaclty as in your example above.

Melden Sie sich an, um zu kommentieren.


Jan
Jan am 23 Jun. 2018
The names of the function are not covered by a copy right. Of course, they are not: imagine the built-in functions "i" and "j".
But it will be a bad idea to call your function like built-in functions of Matlab's toolboxes. Shadowing the built-in functions can cause serious troubles. After an experiment with a user-defined and buggy version of strcmp, my Matlab installation could not be used anymore: There was no chance to modify the path or to open the file for editing. I had to use an external editor to fix this.
It is very hard to guarantee that there are no collisions between user-defined and Matlab's functions. If you do not own all toolboxes or future versions of Matlab contain new functions, there is no chance to check this. You can use FEX: UniqueFuncNames to check at least the locally defined functions.
  4 Kommentare
Boris Blagov
Boris Blagov am 25 Jun. 2018
That is interesting case, thanks for sharing!
I do see why they accepted that - you have done an extention to their product and you did not include their original code. Essentially, you did some optimizing work for them for free without breaching any rules. This is obviously improving and not competing. The idea with the tool is quite elegant solution, I might see if I can adapt that to my situation.
P.S. my main hope was that a staff member might pitch in, especially if it is clearly forbidden.
P.S.S. Regarding your question, I am unsure it is applicable, as I have not copyrighted the function. However, theoretically, if I had any grounds to copyright it/patent it (i.e. a patent body accepted that), then their copying would be copyright infringing if it has the same functionality and name, yes.
Walter Roberson
Walter Roberson am 25 Jun. 2018
Boris, you mentioned that you are in the EU. The entire EU has signed copyright treaties such that "sufficiently original" works are automatically copyrighted at the moment of creation, without any need to register the copyright. Registering the copyright might extend the legal protections available (depending on jurisdiction), but in any jurisdiction that has signed the treaties, the item is copyrighted upon creation even without registration.

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 23 Jun. 2018
The names are not copyrighted. I even know of some functions, skewness() and dataset(), that are being sold by a commercial company. Mathworks knows about that situation. There's no problem, other than being the MAJOR problem that you "put aside".
  1 Kommentar
Boris Blagov
Boris Blagov am 25 Jun. 2018
Yes, I think the same, there are many generic functions names. But when it comes to toolboxes I feel it becomes more blurry. Hence the question. Thank you for your time, though!

Melden Sie sich an, um zu kommentieren.


John D'Errico
John D'Errico am 25 Jun. 2018
I am not a lawyer. But I would argue that it is the code that matters, and the code that has a copyright, which will reside in that code. The name of the function is not covered though. It cannot be. If anything, the name of a function might involve a question of trademark. But that is not the case. You will not find trademarks on the names of functions.
So you can distribute your own version of mvnrnd. It is arguably a poor idea, since your version of that code may well not be coded as well. And if it has subtly different functionality than the one that is supplied by MathWorks then you may be creating subtle bugs inside the code of those who use MATLAB and who have been given your code, possibly without knowing what was done. Such a bug could be difficult to track down.
  1 Kommentar
Boris Blagov
Boris Blagov am 25 Jun. 2018
I agree with you about arguing that the code matters and that would be my defense as well, but as you I am also not a lawyer. I am hoping I can find some factual evidence. Thank you for your time, though!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu AI for Signals finden Sie in Help Center und File Exchange

Produkte


Version

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by