MATLAB: License for private toolbox

licensingMATLABmex api

I am a software developer who has developed a private toolbox. Is there anyway I can have some kind of license control on the toolbox to prevent a customer from unrestricted distributing the toolbox.
Possible approaches: Piggy-back on the matlab license manager? A mxLicense( ) function to let me check the license number from C code?

Best Answer

The license number can be check easily by using the license command in mexCallMATLAB. But this can be replaced easily by a user-defined function, such that this does not have a severe security level.
You find many discussions here and some contributions in the FileExchange for creating a unique machine ID. And internet search engine might be more efficient than the forum search.