필터 지우기
필터 지우기

Undefined function or variable 'price2ret'

조회 수: 5 (최근 30일)
Fara
Fara 2011년 6월 19일
I have installed Matlab in a new computer and try to re-run one of my m files which call price2ret. My m file works before but now the system compliants with "Undefined function or variable 'price2ret'". I have checked my path which correctly points to the toolbox directory. Appreciate if anyone can give me a hand.

답변 (3개)

Fara
Fara 2011년 6월 19일
Problem persists even if I follows the example in Help as: m = 100*exp(0.10*[0:19]'); R = price2ret(m);
Error message: ??? Undefined function or method 'price2ret' for input arguments of type 'double'.
I did explicitly set my current directory to the Econ toolbox that holds price2ret.m.

Walter Roberson
Walter Roberson 2011년 6월 19일
That can happen if the new system does not have the econ toolbox installed, or if it is not licensed for the econ toolbox, or if the econ toolbox is not on the path, or if MATLAB did not notice it exists.
There is a possibility that if you use
rehash toolbox
that it might appear, but my top suspicion would be on the system not being licensed.

Fara
Fara 2011년 6월 20일
Hi Walter,
Thanks for your help. The only thing in your list that I wouldn't be able to verified is that "Matlab didn't notice it exists". Others shouldn't be an issue. In addition, I don't know what is rehash toolbox so I assume that I don't have it. Any other thought?
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 6월 20일
"rehash toolbox" is a MATLAB command. http://www.mathworks.com/help/techdoc/ref/rehash.html
The message you are getting is exactly the message I would expect if you are not licensed to use the toolbox. For example, I am licensed to use the Image Processing toolbox but my co-worker the next office over is not named in the license; I can use the Image Processing commands but he just gets told they do not exist.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by