- Are you positive that the folder temp is on the Matlab search path?
- What does dir(fullfile(absolute_path_name_of_temp,'test?.*)) return?
Matlab does not recognizes function
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a test.m file located in directory temp. This file calls functions named test1 (located in test1.m) test2 (located in test2.m). Both test1.m and test2.m are locted in the same directory as test.m
For calling test1.m it is successive call while for test2.m it tells that function doesn't exists.
Setting breakpoint just before test2 call I'm checking in the command prompt whether it is exists by exist test2 and receiving a positive result (2).
But the call is still with fail.
Only when adding following, I can call the function successfully.
if exist('test2')
test2(...)
end
I have some toolbox (wasn't developed by me) for which this happens a lot of times.
I don't wan't to start digigng for all the places where this happens and doing the update.
What could be done to solev it?
댓글 수: 7
Jan
2022년 8월 18일
test2()
If you get the message "Undefined command/function 'test2'" I wonder, which Matlab version you are using.
Please post an exact copy of the complete error message.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!