Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Why do I get "Has no license available" for my own functions?

Subject: Why do I get "Has no license available" for my own functions?

From: Diego Rother

Date: 1 Feb, 2008 22:36:01

Message: 1 of 36

Hi,

I'm getting this error "??? Undefined command/function
'XXX'." where XXX is a function that I created and was
working minutes ago.

Also, I'm sure that MATLAB is finding the function, since
when I do:

>> which XXX

MATLAB replies:
C:\...\XXX.m % function XXX, Has no license available.

But this is my own function! how come I now need a license
for it?

Thanks,
Diego

Subject: Why do I get "Has no license available" for my own functions?

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 Feb, 2008 23:00:22

Message: 2 of 36

In article <fo06sh$7m$1@fred.mathworks.com>,
Diego Rother <diroth@gmail.com> wrote:

>I'm getting this error "??? Undefined command/function
>'XXX'." where XXX is a function that I created and was
>working minutes ago.

>Also, I'm sure that MATLAB is finding the function, since
>when I do:

>>> which XXX

>MATLAB replies:
>C:\...\XXX.m % function XXX, Has no license available.

>But this is my own function! how come I now need a license
>for it?

Hmmm... -try- "rehash toolbox".

Does XXX happen to be the same name as a matlab provided command?
--
  "There are some ideas so wrong that only a very intelligent person
  could believe in them." -- George Orwell

Subject: Why do I get

From: Diego Rother

Date: 1 Feb, 2008 23:26:04

Message: 3 of 36

> Hmmm... -try- "rehash toolbox".

Nop, it didn't work :-(

> Does XXX happen to be the same name as a matlab provided
command?

No. It used to work before, and I didn't change anything in
the system that I can remember...

Thanks anyway.

Subject: Why do I get

From: John D'Errico

Date: 2 Feb, 2008 00:40:06

Message: 4 of 36

"Diego Rother" <diroth@gmail.com> wrote in message
<fo09qc$41m$1@fred.mathworks.com>...
> > Hmmm... -try- "rehash toolbox".
>
> Nop, it didn't work :-(
>
> > Does XXX happen to be the same name as a matlab provided
> command?
>
> No. It used to work before, and I didn't change anything in
> the system that I can remember...
>
> Thanks anyway.

Don't save your own functions in the Matlab toolbox
directories.

John

Subject: Why do I get

From: Joaquim Luis

Date: 2 Feb, 2008 01:25:04

Message: 5 of 36

 
> >MATLAB replies:
> >C:\...\XXX.m % function XXX, Has no license available.

Hummm, if every function is checked against a license, how
much (time) does it costs?

J. Luis

Subject: Why do I get

From: Diego Rother

Date: 2 Feb, 2008 04:29:02

Message: 6 of 36

It is not in a toolbox directory, it is in a separate directory.

Diego

>
> Don't save your own functions in the Matlab toolbox
> directories.
>
> John

Subject: Why do I get

From: Hugo

Date: 12 Feb, 2008 01:50:02

Message: 7 of 36

"Diego Rother" <diroth@gmail.com> wrote in message
<fo0rie$qpv$1@fred.mathworks.com>...
> It is not in a toolbox directory, it is in a separate
directory.
>
> Diego
>
> >
> > Don't save your own functions in the Matlab toolbox
> > directories.
> >
> > John
>

Hi Diego. I have got the exact same problem you describe.
The which command tells me I don't have a license for my
own function. It used to work fine and I don't think any of
the functions are named after toolbox functions or anything
like that.

Does anyone know the solution??

Subject: Why do I get "Has no license available" for my own functions?

From: Idin Motedayen-Aval

Date: 13 Feb, 2008 02:56:34

Message: 8 of 36

Diego Rother wrote:
> Hi,
>
> I'm getting this error "??? Undefined command/function
> 'XXX'." where XXX is a function that I created and was
> working minutes ago.
>
> Also, I'm sure that MATLAB is finding the function, since
> when I do:
>
>>> which XXX
>
> MATLAB replies:
> C:\...\XXX.m % function XXX, Has no license available.
>
> But this is my own function! how come I now need a license
> for it?
>
> Thanks,
> Diego

Diego,
I'm not sure if this is your issue, but I know of an issue where if one
of your function names in the current directory conflicts with the name
of a function from a toolbox you do not own, the license manager
disables that whole directory. So even though your XXX.m may not have
the same name as an existing toolbox function, some other function in
that folder might, and that could be the culprit.
So, I would move all the files to a different directory, and move them
back in one by one... and see which file makes things break. That's the
one to rename.

I think there used to be a published solution on our web site for this,
but I can't find it right now to send you the link.

HTH,
Idin

--
Idin Motedayen-Aval
The MathWorks, Inc.
zq=[4 2 5 -15 -1 -3 24 -57 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2];
char(filter(1,[1,-1],[105 zq])), clear zq

Subject: Why do I get

From: Diego Rother

Date: 19 Feb, 2008 03:14:02

Message: 9 of 36

Thank Idin, finally something along those lines worked.

I created a new folder and moved everything. If the folder
was a brother of the old folder (child of the same parent
folder) it still didn't work (why?!), but apparently if the
folder is in other place it works.

Best,
Diego

Subject: Why do I get

From: Idin Motedayen-Aval

Date: 19 Feb, 2008 18:04:30

Message: 10 of 36

Diego Rother wrote:
> Thank Idin, finally something along those lines worked.
>
> I created a new folder and moved everything. If the folder
> was a brother of the old folder (child of the same parent
> folder) it still didn't work (why?!), but apparently if the
> folder is in other place it works.
>
> Best,
> Diego

Hi Diego,
Then my guess is there must be a file in the parent folder that has the
same name as a toolbox function, and that's triggering the license
manager to block that entire folder and its children. The way to test
this would be to put anything else under that parent folder and see what
happens.

Disclaimer: I don't know if this is the case, it's just my best guess.

HTH,
Idin

--
Idin Motedayen-Aval
The MathWorks, Inc.
zq=[4 2 5 -15 -1 -3 24 -57 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2];
char(filter(1,[1,-1],[105 zq])), clear zq

Subject: Why do I get

From: Pablo

Date: 2 Apr, 2008 02:43:01

Message: 11 of 36

Hello Idin (and Diego)
I got exactly the same problem but with ALL toolboxes
functions, not with my own ones nor with 'basic' Matlab
functions.
OS: Linux 2.5.22-14-generic, Ubuntu 7.10 (gutsy)
MATLAB: R2008a
Have tried to refresh toolbox cache, reinstall but nothing
helped, I still get the XXX.m %Has no license
Many thanks,
Pablo



Idin Motedayen-Aval <run.signature@MATLAB.for.email> wrote
in message <fpf5ne$3mj$1@fred.mathworks.com>...
> Diego Rother wrote:
> > Thank Idin, finally something along those lines worked.
> >
> > I created a new folder and moved everything. If the folder
> > was a brother of the old folder (child of the same parent
> > folder) it still didn't work (why?!), but apparently if the
> > folder is in other place it works.
> >
> > Best,
> > Diego
>
> Hi Diego,
> Then my guess is there must be a file in the parent folder
that has the
> same name as a toolbox function, and that's triggering the
license
> manager to block that entire folder and its children. The
way to test
> this would be to put anything else under that parent
folder and see what
> happens.
>
> Disclaimer: I don't know if this is the case, it's just my
best guess.
>
> HTH,
> Idin
>
> --
> Idin Motedayen-Aval
> The MathWorks, Inc.
> zq=[4 2 5 -15 -1 -3 24 -57 45 -12 19 -12 15 -8 3 -7 8 -69
53 12 -2];
> char(filter(1,[1,-1],[105 zq])), clear zq

Subject: Why do I get

From: Diego Rother

Date: 2 Apr, 2008 15:09:02

Message: 12 of 36

Have you tried moving everything to a new folder?
that worked for me...

Subject: Why do I get

From: Pablo

Date: 2 Apr, 2008 18:10:05

Message: 13 of 36

"Diego Rother" <diroth@gmail.com> wrote in message
<ft07ie$3q2$1@fred.mathworks.com>...
> Have you tried moving everything to a new folder?
> that worked for me...
>

Hello Diego,
I moved everything form $/matlabR2008a to
$/MATLAB/matlabR2008a, yet the problem persisted.
To my surprise, all path entries where automatically updated
to reflect this change. Nice feature I might say.
Many thanks,
Pablo

Subject: Why do I get

From: Stanley Parker

Date: 28 Jul, 2008 20:51:01

Message: 14 of 36

"Pablo " <pablo.blinder@gmail.com> wrote in message
<ft0i5t$1md$1@fred.mathworks.com>...
> "Diego Rother" <diroth@gmail.com> wrote in message
> <ft07ie$3q2$1@fred.mathworks.com>...
> > Have you tried moving everything to a new folder?
> > that worked for me...
> >
>
> Hello Diego,
> I moved everything form $/matlabR2008a to
> $/MATLAB/matlabR2008a, yet the problem persisted.
> To my surprise, all path entries where automatically updated
> to reflect this change. Nice feature I might say.
> Many thanks,
> Pablo


I am also getting this error. regrettably mathworks has
decided that I do not have the freedom to name my functions
whatever I would like, or to name them the same as toolbox
functions. To make things more complicated, I am using code
written by someone using the statistics toolbox, and am
implementing the missing functionality as needed (really, I
can just use '\' instead of 'regress'.).
I've now lost a full hour trying to move files around,
renaming them, etc, and still I "Has no license available."

can anybody explain how to deal with this error?
can somebody explain why I shouldn't just be switching over
to octave?

Subject: Why do I get "Has no license available" for my own functions?

From: Mano MAURYA

Date: 14 Jan, 2009 21:35:04

Message: 15 of 36

Hi All:
I was getting this error after installing Matlab2008a recently. After some bugging/debugging, I realized that the folder

MATLABROOT\licenses had only one file

network.lic with two lines (server license) like
SERVER XXX-flexlm-XXX3.UNIV.edu NNNeNcNN NNNN
USE_SERVER

Then I put the file license.dat which has content like:

SERVER XXX-flexlm-XXX1.UNIV.edu NNNeNcNN NNNN
SERVER XXX-flexlm-XXX2.UNIV.edu NNNeNcNN NNNN
SERVER XXX-flexlm-XXX3.UNIV.edu NNNeNcNN NNNN
USE_SERVER

in the folder

MATLABROOT\licenses

Restarted matlab, and then everything seems to be working fine.

Hope this may helps others too.

Best,
Mano
====================
"Diego Rother" <diroth@gmail.com> wrote in message <fo06sh$7m$1@fred.mathworks.com>...
> Hi,
>
> I'm getting this error "??? Undefined command/function
> 'XXX'." where XXX is a function that I created and was
> working minutes ago.
>
> Also, I'm sure that MATLAB is finding the function, since
> when I do:
>
> >> which XXX
>
> MATLAB replies:
> C:\...\XXX.m % function XXX, Has no license available.
>
> But this is my own function! how come I now need a license
> for it?
>
> Thanks,
> Diego
>
>

Subject: Why do I get "Has no license available" for my own functions?

From: Fabio Boschetti

Date: 22 Jul, 2010 04:01:19

Message: 16 of 36

"Mano MAURYA" <mauryam@yahoo.com> wrote in message <gkllq8$r4d$1@fred.mathworks.com>...
> Hi All:
> I was getting this error after installing Matlab2008a recently. After some bugging/debugging, I realized that the folder
>
> MATLABROOT\licenses had only one file
>
> network.lic with two lines (server license) like
> SERVER XXX-flexlm-XXX3.UNIV.edu NNNeNcNN NNNN
> USE_SERVER
>
> Then I put the file license.dat which has content like:
>
> SERVER XXX-flexlm-XXX1.UNIV.edu NNNeNcNN NNNN
> SERVER XXX-flexlm-XXX2.UNIV.edu NNNeNcNN NNNN
> SERVER XXX-flexlm-XXX3.UNIV.edu NNNeNcNN NNNN
> USE_SERVER
>
> in the folder
>
> MATLABROOT\licenses
>
> Restarted matlab, and then everything seems to be working fine.
>
> Hope this may helps others too.
>
> Best,
> Mano
> ====================
> "Diego Rother" <diroth@gmail.com> wrote in message <fo06sh$7m$1@fred.mathworks.com>...
> > Hi,
> >
> > I'm getting this error "??? Undefined command/function
> > 'XXX'." where XXX is a function that I created and was
> > working minutes ago.
> >
> > Also, I'm sure that MATLAB is finding the function, since
> > when I do:
> >
> > >> which XXX
> >
> > MATLAB replies:
> > C:\...\XXX.m % function XXX, Has no license available.
> >
> > But this is my own function! how come I now need a license
> > for it?
> >
> > Thanks,
> > Diego
> >
> >
----------------------------------------
i had a similar problem, just to discover that my MATLABROOT\licenses
did not have any network.lic; something must have happened when i upgraded my licence from R2007 to R2010. after re-setting the network.lic file the issue was solved

Subject: Why do I get "Has no license available" for my own functions?

From: J. Ole Kaven

Date: 12 Aug, 2010 20:28:06

Message: 17 of 36

Hi everybody, thanks for the provided help so far. It seems to me that the possible remedies are: 1) add license.dat to network.lic in licenses folder; 2) rehash the toolboxes; 3) rename files; 4) reset PATH; 5) move directories.

Unfortunately, nothing has work to remedy this problem for me.
So far I have:
1) Added extra lines to license.dat in ~/$MATLAB/licenses/
2) used 'rehash toolbox'
3) renamed the file in question to something onvolving my name and birth date (highly doubt MATLAB is keeping files of me)
3) deleted and reset the PATH
4) Moved the directory '~/.../mlab' (personal matlab file directory under $HOME) to '~/.../mymatlab'

I stil get the same error, namely "% Has no license available".

Would it be possible for MATHWORKS to investigate this and give a more successful remedy? Seems like this thread has been going on for over 2 years adn people are still having problems...
In the meantime, I would greatly appreciate any help from the user community also!

Subject: Why do I get "Has no license available" for my own functions?

From: Steven_Lord

Date: 13 Aug, 2010 14:11:17

Message: 18 of 36



"J. Ole Kaven" <olekaven@gmail.com> wrote in message
news:i41lgm$8q2$1@fred.mathworks.com...
> Hi everybody, thanks for the provided help so far. It seems to me that the
> possible remedies are: 1) add license.dat to network.lic in licenses
> folder; 2) rehash the toolboxes; 3) rename files; 4) reset PATH; 5) move
> directories.
> Unfortunately, nothing has work to remedy this problem for me. So far I
> have:
> 1) Added extra lines to license.dat in ~/$MATLAB/licenses/
> 2) used 'rehash toolbox'
> 3) renamed the file in question to something onvolving my name and birth
> date (highly doubt MATLAB is keeping files of me)
> 3) deleted and reset the PATH
> 4) Moved the directory '~/.../mlab' (personal matlab file directory under
> $HOME) to '~/.../mymatlab'
>
> I stil get the same error, namely "% Has no license available".
>
> Would it be possible for MATHWORKS to investigate this and give a more
> successful remedy? Seems like this thread has been going on for over 2
> years adn people are still having problems...
> In the meantime, I would greatly appreciate any help from the user
> community also!

Yes -- contact Technical Support and they will investigate what's causing
this problem with you.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Why do I get "Has no license available" for my own functions?

From: Salman Ansari

Date: 6 Oct, 2010 15:12:27

Message: 19 of 36

This is what I got from The MathWorks. Hope it helps:

% --- BEGIN --- %
This issue occurs because one or more of the MATLAB files in this folder have the same name as a MATLAB function which is in a toolbox that you are not licensed for. This conflict occurs for certain specific functions. For example, suppose you have a MATLAB file called 'hamming.m' and do not have the Signal Processing Toolbox.

You will receive the same output for all MATLAB files located in the same folder as 'hamming.m' and will be unable to run any files in this directory. To work around the issue, rename the conflicting MATLAB file. In this case change the name of 'hamming.m'.

To find which MATLAB files have the same name as a MATLAB function in a toolbox that you are not licensed for, go to:

http://www.mathworks.com/support/functions/alpha_list.html

and either search or index through the function names to find which of your MATLAB files has the same name as a MATLAB function that you are not licensed for.
% --- END --- %

"Diego Rother" <diroth@gmail.com> wrote in message <fo06sh$7m$1@fred.mathworks.com>...
> Hi,
>
> I'm getting this error "??? Undefined command/function
> 'XXX'." where XXX is a function that I created and was
> working minutes ago.
>
> Also, I'm sure that MATLAB is finding the function, since
> when I do:
>
> >> which XXX
>
> MATLAB replies:
> C:\...\XXX.m % function XXX, Has no license available.
>
> But this is my own function! how come I now need a license
> for it?
>
> Thanks,
> Diego
>
>

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 6 Oct, 2010 20:15:25

Message: 20 of 36

Dear Salman,

> To find which MATLAB files have the same name as a MATLAB function in a toolbox that you are not licensed for, go to:
>
> http://www.mathworks.com/support/functions/alpha_list.html

I'm puzzled.
Matlab detects a license violation by comparing file names --- although it is not uncommon, that users write own functions.

And if one of my functions is called "getFunctionName", I get a cryptic license error, which does not reveal any details. A not obfuscated message could be: "There is a naming conflict between a function you have and a function you don't have" ?! Too strange to be implemented, of course.

I have to check all my functions manually one by one on a web page to find collisions.

This is not smart.

Jan

Subject: Why do I get "Has no license available" for my own functions?

From: Bjorn Gustavsson

Date: 6 Oct, 2010 20:52:05

Message: 21 of 36

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i8ilct$a3s$1@fred.mathworks.com>...
> Dear Salman,
>
> > To find which MATLAB files have the same name as a MATLAB function in a toolbox
> > that you are not licensed for, go to:
> >
> > http://www.mathworks.com/support/functions/alpha_list.html
>
> I'm puzzled.
> Matlab detects a license violation by comparing file names --- although it is not
> uncommon, that users write own functions.
>
I'll second that!

For example: In a medium-sized image data analysis project I've written and spread, I obviously use some of Mathworks filtering functions (medfilt2, wiener2,...). Some of my colleagues does not necessarily have access to the image processing toolbox, but the signal processing, so I wrote a fall-back function medfilt2 that called medfilt1 twice - not exactly identical, but for all practical purposes OK, other colleagues didn't have that toolbox either, so I wrote another fall-back function, same thing with wiener2 - just implemented it straight out of Gonzales and Woods.

If the _function_names_ become license protected, please dear mathworkers, teach me a programming pattern that I can use instead of shading mathwork-toolbox-functions with identically named versions with sufficiently similar functionality?

Hoping for a change in policy,
Bjoern

Subject: Why do I get "Has no license available" for my own functions?

From: dpb

Date: 6 Oct, 2010 22:49:22

Message: 22 of 36

Jan Simon wrote:
> Dear Salman,
>
>> To find which MATLAB files have the same name as a MATLAB function in
>> a toolbox that you are not licensed for, go to:
>>
>> http://www.mathworks.com/support/functions/alpha_list.html
>
> I'm puzzled.
> Matlab detects a license violation by comparing file names --- although
> it is not uncommon, that users write own functions.
>
...

I don't follow what gives TMW the right to prevent users from naming
their home-brew functions whatever name they choose -- certainly the
example of "hamming" would be quite a logical choice for anyone to
select for their own implementation. Seems awfully heavy-handed to be
told "you can't do that" even if the implementation is fully from
published literature, nothing whatever to do w/ TMW.

I'd yell loudly if pinched, too...

--

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 6 Oct, 2010 23:41:05

Message: 23 of 36

Dear dpb,

> I don't follow what gives TMW the right to prevent users from naming
> their home-brew functions whatever name they choose --

Without doubt TMW has the right to protect the Matlab toolboxes from illegal use. But checking the file names is, as said already, "not smart". If somebody dares to steal toolbox functions, he is able to rename them in addition. So reserving the file names has a very limited effect for security, but it reduces the usability of Matlab:
> I'm getting this error "??? Undefined command/function
> 'XXX'." where XXX is a function that I created and was
> working minutes ago.
Weird.

The license protection and activation procedure is a mess. It would be much smarter, if all Matlab users buy the necessary licenses and TMW omit the impeding methods to restrict the usage of Matlab.

Kind regards, Jan

Subject: Why do I get "Has no license available" for my own functions?

From: dpb

Date: 7 Oct, 2010 00:09:32

Message: 24 of 36

Jan Simon wrote:
> Dear dpb,
>
>> I don't follow what gives TMW the right to prevent users from naming
>> their home-brew functions whatever name they choose --
>
> Without doubt TMW has the right to protect the Matlab toolboxes from
> illegal use. ...

Certainly.

But that's a far different subject that preventing the use of a function
name on the mere presumption that the end user couldn't have written a
function by that name on their own.

--

Subject: Why do I get "Has no license available" for my own functions?

From: Terry

Date: 7 Oct, 2010 08:07:08

Message: 25 of 36

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i8j1eg$a48$1@fred.mathworks.com>...
> Dear dpb,
>
> > I don't follow what gives TMW the right to prevent users from naming
> > their home-brew functions whatever name they choose --
>
> Without doubt TMW has the right to protect the Matlab toolboxes from illegal use. But checking the file names is, as said already, "not smart".

Really?! I've wondered how they try to enforce licensing when they distribute the source code for anything that isn't a MEX file. I didn't imagine they'd actually go by function name! If true, that ranks right up there with resolving symbolic links because they're inconvenient for an underdeveloped concept of identity (nominal path)--only in this case it wouldn't even be effective, at least against anyone with find-and-replace.

Working around limitations of past design decisions one by one as you're forced to results not only in inelegance but needless functional limitation.

> If somebody dares to steal toolbox functions, he is able to rename them in addition. So reserving the file names has a very limited effect for security, but it reduces the usability of Matlab:
> > I'm getting this error "??? Undefined command/function
> > 'XXX'." where XXX is a function that I created and was
> > working minutes ago.
> Weird.
>
> The license protection and activation procedure is a mess. It would be much smarter, if all Matlab users buy the necessary licenses and TMW omit the impeding methods to restrict the usage of Matlab.

Well, in my humble opinion the smartest route wouldn't involve relying on humans overcoming their nature and TMW trusting that they've done so. ;-)

Instead, they might consider simply not distributing their toolbox code in human readable form. If they've implemented JIT compilation, they can clearly compile without manually rewriting in C. Translate and MEX whatever can't be JITted and bundle it all in libraries that can only be unlocked with the MLM's go-ahead.

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 7 Oct, 2010 08:23:05

Message: 26 of 36

Dear dpb,

> > Without doubt TMW has the right to protect the Matlab toolboxes from
> > illegal use. ...
>
> But that's a far different subject that preventing the use of a function
> name on the mere presumption that the end user couldn't have written a
> function by that name on their own.

Correct. I just try to imagine the intention of such a weird feature.

On the other hand re-using names of toolbox functions can cause serious troubles: I've overloaded STRCMP, ISEQUAL, EQ and CELLSTR (and some other functions) to observe what's going on in a P-coded function (hi Matt!). Due to a bug, these functions fail to call the shadowed functions after printing the input to the command window. In consequence neither EDIT, nor DELETE, nor CLEAR, nor QUIT (stopped by my FINISH function...) have been working any longer. Evil! I had to kill the process and fix the functions within WordPad.
Summary: naming conflicts are a real problem - even without the dirty (sorry: "not smart") copy protection tricks.

If I develop a toolbox for different labs, it would be very helpful to have a tool, which helps to avoid naming conflicts (besides the +packages --- btw.: does an illegal copy of a toolbox work inside a +package folder?!?!).
I imagine a stituation, where I develop this toolbox under Matlab 2008a *without* the 2008a version of the XYZ toolbox. Then I ship my toolbox to a customer, who uses 2010a, also *without* the 2010a version of the XYZ toolbox.
Now my toolbox is working on my computer, but dropping the weird errors on the customers machine, because the new XYZ-toolbox has a new function, which interferes with the names of my toolbox. The customer is absolutely not happy with my software causing a license conflict!
Ah, no problem! I simply ask the customer to check all 2200 function names manually on "www.mathworks.com/support/functions/alpha_list.html". :-)

Of course, I know that I'm not telling anything new. Sorry. It is too obvious. I just repeat the completely obvious effects of naming conflicts and a stealth-mode function name blocking.

@TMW: Please disable the secret function name checks and make it public instead. Please let me download ISTOOLBOXFUNCNAME similar to ISKEYWORD, which allows to check for all function names of either all, or the newest or a specified Matlab release. It seems like WHICH does this internally, but then it would be nice to document that.

Kind regards, Jan

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 7 Oct, 2010 08:53:08

Message: 27 of 36

Dear Terry,

> Instead, they might consider simply not distributing their toolbox code in human readable form.

But the human readable form of toolbox functions is one of the important highlights of Matlab!
The results of my Runge-Kutta-4(5) integrator and Matlab's ODE45 differ? So just look in the code and compare how the local discretization error is scaled and how the stepwidth for the jacobian is determined. If I can detrmine the differences, I can trust both integrators. Without the source code, the documentation of all functions must be expanded tremendously to allow a serious scientific working.

An of course, if the source code is not shipped anymore, TMW has to do all the debugging and cannot rely on assiduous users digging in the code until they found the problem.

A better -or worse?- idea would be to increase the price of the base Matlab program and decrease the price of toolboxes: Currently the toolboxes are as expensive as the base Matlab program (rule of thumb). If the price of Matlab is increased by factor 4, and the toolboxes costs 5 $ only, *nobody* would use an illegal copy of a toolbox.
But the number of illegal copies of the base Matlab will grow, and if someone wants to buy just Matlab without a toolbox, he will be not amused definitely.

I'm aware that even my daily updated virus checker sometimes estimates valid programs to be malware due to accidently matching fingerprints. In comclusion I think, that a "not-silly" "protection" is a contradiction.

Kind regards, Jan

Subject: Why do I get "Has no license available" for my own functions?

From: Bjorn Gustavsson

Date: 7 Oct, 2010 16:34:04

Message: 28 of 36

In preparation for the time when my colleagues start using the version of matlab where using fall-back functions that are namesakes of Mathworks-functions will be met with this "no license" ban I'd like to repeat my question: Has anyone come up with a neat and clean programming pattern that can be used to provide identical/similar functionality if a user not has access to a mathworks toolbox that has functions that is preferably used (for sake of performance and whatnot)?

For example if in my image pre-processing function I make a call to medfilt2 from the image processing toolbox, I have a shadowed version in a personal directory - that will be used by users that hasn't the image processing toolbox. With this shadowing allowed, it works seamlessly and all there is only a slight difference in performance.

Hoping for help,
Bjeorn

Subject: Why do I get "Has no license available" for my own functions?

From: Scott Hirsch

Date: 7 Oct, 2010 16:37:03

Message: 29 of 36

It turns out that MathWorks licensing techniques are quite a bit more elaborate than described earlier in this thread (it appears to me that the response from MathWorks technical support to Salman Ansari was incorrect). Our intention is that we do fully support the use cases described here. There shouldn’t typically be issues when a user happens to have some functions of their own that have the same name as functions shipped by MathWorks. If you encounter situations where this doesn’t work as expected, please contact technical support. I will make sure that our technical support engineers have more accurate information for helping work through the issues.

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 7 Oct, 2010 19:45:05

Message: 30 of 36

Dear Scott,

thank you very much for the calming information.
It would be helpful to have an ISTOOLBOXFUNCNAME function in every case.

Kind regards, Jan

Subject: Why do I get "Has no license available" for my own functions?

From: Steven_Lord

Date: 7 Oct, 2010 20:09:04

Message: 31 of 36



"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message
news:i8l801$3ka$1@fred.mathworks.com...
> Dear Scott,
>
> thank you very much for the calming information.
> It would be helpful to have an ISTOOLBOXFUNCNAME function in every case.

I read through your description of what you would expect that function to
do, but I'm still not quite sure what you're looking for.

Are you looking for something that, given a name, would tell you which
toolboxes contain a function with that name even if you don't have that
toolbox installed?

Do you want it to look inside packages [so istoolboxfuncname('map') would
return 'matlab' since there's a class map in the Containers package that's
part of MATLAB?]

    http://www.mathworks.com/help/techdoc/ref/containers_map.html

Do you want it to look for object methods, so istoolboxfuncname('subsref')
would list all the toolboxes that contain an object that overloads subsref?
Should this also count non-public methods?

Do you want it to look inside private directories?

Do you want it to look only for documented functions?

If you're looking just for documented functions that are neither inside
packages nor object methods, you might be able to do something with URLREAD
that accesses the appropriate page in the online documentation and
determines if the page exists, or you could search the appropriate section
of the page containing the alphabetical list of functions.

http://www.mathworks.com/help/index.html
http://www.mathworks.com/support/functions/alpha_list.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Why do I get "Has no license available" for my own functions?

From: Scott Hirsch

Date: 7 Oct, 2010 20:28:04

Message: 32 of 36

I find Jan's suggestion intriguing.

Here's my stab at answers, based on a very specific use case:
I'm developing something that I give to a bunch of people. I have no idea what MathWorks products they have installed. If my stuff is on the top of the path, I don't want my functions to inadvertently shadow any MathWorks functions, which could cause other code my user runs to break. If my stuff is on the bottom of the path, I don't want MathWorks functions to inadvertently shadow any of my functions, which would cause my code to break.

So:
* All functions that could potentially cause the shadowing issues mentioned above. This rules out constructs which provide scoping explicitly:
** Don't worry about packages
** Don't worry about functions in privates
** Don't worry about methods
**Undocumented functions need to be included, too

There may be more robust ways to get to the root cause of the challenges I outlined above, but it seems a function like this could give a nice warm fuzzy feeling before sending out code to others.

One more thought, though - the next thing I'd want would be some code that checks the name of all of my top-level functions against this list.

File Exchange, anyone???

Subject: Why do I get "Has no license available" for my own functions?

From: Jan Simon

Date: 7 Oct, 2010 22:59:04

Message: 33 of 36

Dear Steven,

> > It would be helpful to have an ISTOOLBOXFUNCNAME function in every case.
> ...
> http://www.mathworks.com/support/functions/alpha_list.html

I'd appreciate a function is equivalent to the checks on the alpha_list.html page, but performs the checks programatically. The purpose would be to obtain a warning for potential naming conflicts, such that private functions are not needed.
Including the undocumented functions would be important also: The accidently overloaded FEATURE would confuse Matlab deeply.

I do not think that a FEX submission could carry that weight. I have such a function, which helps to find conflicts between my functions and the toolbox functions of all Matlab versions I have installed. But firstly I can feed it only with the small number of toolboxes I have. And secondly I cannot maintain such a function with updates twice a year.

Kind regards, Jan

Subject: Why do I get "Has no license available" for my own functions?

From: Yair Altman

Date: 8 Oct, 2010 05:52:04

Message: 34 of 36

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i8l801$3ka$1@fred.mathworks.com>...
> Dear Scott,
>
> thank you very much for the calming information.
> It would be helpful to have an ISTOOLBOXFUNCNAME function in every case.
>
> Kind regards, Jan

I second Jan's request. Also, I suggest rewording the error message to suggest simply renaming the offending function.

I believe that this error also occurs if you created a user-defined function and gave it a name that is already used by a Matlab toolbox function which is not even installed. This triggers Matlab to block your entire folder. Also see: http://www.mathworks.com/matlabcentral/newsreader/view_thread/271202 and http://www.mathworks.com/support/solutions/en/data/1-4B6E5E/

Sometimes it can drive you nuts when you accidentally program a function with a name that Matlab has already chosen in one of its toolboxes... Since I never installed the toolbox, I have no idea that I accidentally shadow a non-existing function on my system!

Furthermore, I may give a client an application that will possibly break someday if and when MathWorks adds a new function to some of its toolboxes that happens to shadow one of my function names - this would simply be absurd. To overcome this I typically use distinctive function names, but there is really no reason I should do this.

Yair Altman
http://UndocumentedMatlab.com

Subject: Why do I get "Has no license available" for my own functions?

From: Scott Hirsch

Date: 8 Oct, 2010 09:38:04

Message: 35 of 36

As I mentioned in an earlier post, this is not the expected behavior. A folder of your own original code should not be blocked because it happens to contain one file with the same name as one in our toolboxes. If this is in fact happening, please contact technical support so that we can help diagnose the issue.

Subject: Why do I get "Has no license available" for my own functions?

From: Tim

Date: 15 Aug, 2013 06:55:07

Message: 36 of 36

So I found this wonderful "feature" yesterday. I lost over an hour debugging my own, tested and already working code on a new windows installation with R2013a. Interesting to see that 5 years after the original post this is still a lingering bug.

I think its time to start learning Python...

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us