Unrecognized function or variable 'typeof'
9 ビュー (過去 30 日間)
古いコメントを表示
I am getting a very weird error every once in a while, and it happens so randomly that I can't even really see a pattern to understand what causes this. I have a main code for a project which calls functions from different directories. I open Matlab and add the folders that my main code needs into my Matlab path, but sometimes Matlab gives an error sound after doing this (although the directory is actually added to the path) and then it gives the error in the screenshot I shared. After this, MATLAB practically becomes non-funtional: Command window works but I can't run any other m files, or I can't remove the folders I added from the path so I have to re-open MATLAB. I don't have any ways to reproduce this error because even if I don't make any changes, it sometimes starts working back after a couple of days.
Some of the folders are far away from the main code and I realized that sometimes it works to add these helper folders into the same directory my main m file lies in. I can do this if there is no solution to this but obviously this will require copying and pasting these folders any time I want to work on a new project.
I have seen one question about this unrecognized 'typeof' error but it didn't quite help my situation.
Has anyone ever encountered a similar error when trying to add directories into their paths? Any help is appreciated.
Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/359809/image.png)
0 件のコメント
採用された回答
Steven Lord
2020 年 9 月 13 日
You have downloaded or written an isa function that is shadowing (taking precedence over) the built-in isa function. Locate that shadowing isa.m and rename or remove the isa.m files that are not in a directory under matlabroot. Line 2 of that isa.m calls typeof which is not a function included in MATLAB.
which -all isa
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!