Matlab doesn't "Pause on Error" till Infinite recursion
이전 댓글 표시
Hello,
for a project I am working on I have to rewrite a .m-file. As it is quite complex (at least for me) I move forward by running the edited script, getting the next error message, fixing the issue and reapeat. This worked fine for my last few projects, however with this, it's different.
When Matlab hits a line it can't execute (e.g. a function that is not in the file path), it throws an error (as expected)...
Undefined function or variable 'Output_data'.
Error in wPLI_openfield (line 237)
data.trial{k} = Output_data((j:(k*10000)),:)';
...but won't stop computing for a few minutes or so (haven't timed it yet, maybe 2 - 4 minutes?). After that I get the following error message:
Out of memory. The likely cause is an infinite recursion within the
program.
Error in fileparts (line 40)
elseif ~isrow(file)
The recursion unlikely comes from the script (had the same problem with different m.-files) i am editing. I guess it has to be a more basic problem of Matlab or its core functions. But honestly, I just don't know.
As this is quite annoying and I don't know where it comes from, I hope some of you guys can help me with this issue. I already tried reinstalling everything twice.
I'm using Matlab2018a 9.4 on my Windows 10 Home 64 bit system.
댓글 수: 1
Adam
2019년 11월 14일
Did you strip your path back to the minimum (just Mathworks folders plus a single folder for your own code) and see if you still get the problem?
채택된 답변
추가 답변 (1개)
Walter Roberson
2019년 11월 14일
There are some third-party toolboxes that define isrow() and that interferes with MATLAB. Check
which -all isrow
What you see should start with a bunch of line similar to
built-in (/Applications/MATLAB_R2019b.app/toolbox/matlab/elmat/isrow)
built-in (/Applications/MATLAB_R2019b.app/toolbox/matlab/elmat/@cell/isrow) % cell method
built-in (/Applications/MATLAB_R2019b.app/toolbox/matlab/elmat/@char/isrow) % char method
You should not see any .m files listed until
/Applications/MATLAB_R2019b.app/toolbox/matlab/timefun/@datetime/datetime.m % datetime method
and a few others that are obviously from Mathworks.
What you will probably see instead is the first one being a .m from some third party code. You will need to use pathtool to locate the directory that code is in, and move it to the end of your MATLAB path, and save.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
