- Set breakpoint at the beginning of eyescript and run to it.
- Step OVER the calls to MATLAB functions like strcat and fprintf.
- Step IN to the call to symeye
- Continue this pattern until the program takes an unexpected turn.
How to solve Maximum recursion limit of 500 reached problem
190 views (last 30 days)
Dear all, my matlab function is this
function eyescript(func, begin_in, end_in, args, ext)
when i want to call out this function eyescript i keep getting this error
Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to
change the limit. Be aware that exceeding your available stack space can crash
MATLAB and/or your computer.
Error in eyescript
What should i do to prevent this error from happening? Thanks in advance.
Ken Atwell on 14 Nov 2014
A recursion depth of 500 is "absurd", almost surely indicating a problem in the code and not some limitation in MATLAB. The recursion could be in symeye -- does it call itself, or call eyescript? Recursion problems can be tricky to debug. I recommend:
PS: I second Adam's comment about your 'for' loop, it is likely not what you intend.