Matlab not recognizing the file within directory
23 次查看(过去 30 天)
显示 更早的评论
I've had this issue once and this is the second time. When I'm running a file whose path has already been set and all the relevant folders have been added, Matlab is simply not recognizing the file. Its giving me an error "Undefined function or variable 'myFile'". I did resolve the first time by copying the code to a new script and saving them in different location and this is the second time that it has occurred. How could I resolve this matter?
And yes, its just one piece of code file that is getting the error, the rest o my previous matlab works are running successfully.
回答(1 个)
Walter Roberson
2014-1-24
Try giving the command
rehash toolbox
6 个评论
Walter Roberson
2014-2-1
Try
ls My*.*
without the '!' before it. (You had not indicated the OS you were using and I guessed incorrectly.)
另请参阅
类别
在 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!