Why does Matlab running in linux have difficulty seeing files on path
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Files added to the path in MATLAB and also in MCR SDK code, cannot be seen and generate an error. If I look on the dirve, the file is there, but for some reason Matlab cannot find the files. Many times a while loop checking for existence will allow the program to wait long enough so that the file appears.
Maybe a problem with enough delay after program startup.
HAve to put loops in the startup.m to wait until a missing file is available.
댓글 수: 1
Jan
2017년 1월 5일
What is your question?
답변 (1개)
Jan
2017년 1월 5일
0 개 추천
Use rehash to read the fiels from the Matlab path again.
댓글 수: 2
Jan
2017년 1월 9일
Allan wrote:
This works if I put rehash in a while loop with a pause of 1 second and continuously check for the existence of the file. But why do I need to do this?
Jan
2017년 1월 9일
Matlab stores a list of M-files found in the path, because checking this dynamically needs a lot of time, e.g. if you have many folders in the path and they are located on a network drive.
rehash triggers the search manually. But creating M-files dynamically is a bad programming practize and prone to bugs.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!