matlab cannot see file on path

Hi all,
I am running release 2014a under windows 7 professional with a network license.
I am executing a function (test.m) that makes a call to the function zeta.m. The functions test.m and zeta.m are both in my working directory. However, although matlab executes the function test.m, when this reaches the call to zeta.m matlab attempts to check out the symbolic Math Toolbox for which a license is not currently available. This returns the usual error:
License checkout failed. License Manager Error -4 Maximum number of users for symbolic_toolbox reached.
However, I don't want Matlab to attempt to check out this license but rather use the copy of zeta.m in the working directory. I thought Matlab always checked the working directory for functions before searching the wider path. It will be a bit annoying to have to rename all calls to zeta to avoid this error. Is there anyway to force Matlab to use the local zeta function and avoid trying to access the symbolic toolbox?
Any help appreciated.
Best wishes,
John

4 件のコメント

Geoff Hayes
Geoff Hayes 2014 年 5 月 7 日
Hi John - that is my understanding too. Have you verified that your working directory is at the top of the MATLAB search path? You can also try typing which zeta -all (in the Command Window) to see what information it returns on function precedence (type help which for more details on this command).
John Anderson
John Anderson 2014 年 5 月 8 日
Hi Geoff,
Thanks for your feedback. I have taken a closer look using the which command and also placed a copy of my working directory at the top of the matlab path as you suggested.
Typing which zeta -all yields the following four entries:
C:\Users\John\Dropbox\Documents\My Documents\dev\panalytical\20140428\zeta.m
C:\Program Files\MATLAB\R2014a\toolbox\symbolic\symbolic\@single\zeta.m % single method
C:\Program Files\MATLAB\R2014a\toolbox\symbolic\symbolic\@double\zeta.m % double method
C:\Program Files\MATLAB\R2014a\toolbox\symbolic\symbolic\@sym\zeta.m % sym method
The function indicated to be taking precedence is the zeta function in my working directory. However, if I use which to determine what implementation of zeta will be used during a typical function call by typing which zeta(1) then this yields the following:
C:\Program Files\MATLAB\R2014a\toolbox\symbolic\symbolic\@double\zeta.m % double method
implying that the indicated precedence is not being complied with. Do you know if there is any way of simply blocking attempts to use the toolbox or to force precedence? I will keep looking and update if I find anything. This seems like a quite an annoying bug at the moment.
Best wishes, John
John Anderson
John Anderson 2014 年 5 月 8 日
Hi all,
A very simple workaround is to just remove the paths to the symbolic math toolbox from the path list. Matlab then doesn't attempt to check out the symbolic toolbox and the file (zeta.m) in the working directory takes precedence. Not the best solution but at least it works.
Best wishes,
John
Geoff Hayes
Geoff Hayes 2014 年 5 月 8 日
Interesting workaround, John.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2014 年 5 月 7 日

コメント済み:

2014 年 5 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by