Recursion limit is reached

30 ビュー (過去 30 日間)
Muthu
Muthu 2013 年 1 月 21 日
Hi,
I am using a function that calls itself until a certain condition is reached. It works for lower iterations but when I want to run it for higher number of iterations i get an error message that says stack limit is reached. Is there any way to get pass this error? Thanks for all answers in advance

回答 (1 件)

Jan
Jan 2013 年 1 月 21 日
Please post a copy of the message.
You can increase the recursion limit:
set(0, 'RecursionLimit', 1000)
But in general a very deep recursion is an inefficient design. Think of changing the method to a non-recursive algorithm.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by