Hello,
after installing the new matlab 2011b version I added my old matlab files to the matlab path and everything works fine. However in the meanwhile I created some new matlab functions in a new folder and added the new folder also to the matlab path. Here's the problem: The new functions work only once (as functions). After I closed an reopened matlab I get always the message "undefined function...". Strangely I can see the new folder on the matlab path (either in the gui or via the path command in the matlab window). I can also edit the files and access my help text via typing the function into the command window which in my opinion shows that they are in the matlab path. However I cannot use them as functions. Any suggestions?
Best regards,
Martin

댓글 수: 1

Daniel Shub
Daniel Shub 2011년 11월 29일
If any of the answers below solved your problem, then you should accept one. If they help you along the way, then you should vote for them. If your problem is now solved, but not by there answer, then post the solution and accept it.

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

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2011년 11월 28일

0 개 추천

What is your function name? Do you have a conflict with other functions or variable names. Try to use which command.
which YourFunctionName -all

댓글 수: 2

Martin
Martin 2011년 11월 29일
Thank you guys, your hints directed me to the solution!
It was really an toolbox license-problem. First I tried the "which" command which lead to the error message "% Has no license available". (I built a price2ret function which is included in the econometrics tollbox). I renamed the function but still got the error message. Finally I found out that matlab blocks the whole folder where the function is located in (I had another function called "lbqtest" in the same folder). Since I created a new folder with my own "not-conflicting-with-matlab-toolbox" functions everything works fine.
Best regards,
Martin
Fangjun Jiang
Fangjun Jiang 2011년 11월 29일
Okay, good to know. Yes, usually you should not save your own function in the folder of a MATLAB Toolbox. However, I was a little bit surprised to learn that if the license of a Toolbox is not available, the entire folder of that Toolbox is not 'accessible'.

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

Jan
Jan 2011년 11월 28일

0 개 추천

Please post the complete error message. There have been conflicts between user-defined functions and not installed toolboxes containing functions with the same name. Whenever a problem seems to be magic, I remember this problem.

댓글 수: 1

Martin
Martin 2011년 11월 29일
Thank you guys, your hints directed me to the solution!
It was really an toolbox license-problem. First I tried the "which" command which lead to the error message "% Has no license available". (I built a price2ret function which is included in the econometrics tollbox). I renamed the function but still got the error message. Finally I found out that matlab blocks the whole folder where the function is located in (I had another function called "lbqtest" in the same folder). Since I created a new folder with my own "not-conflicting-with-matlab-toolbox" functions everything works fine.
Best regards,
Martin

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2011년 11월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by