Path: news.mathworks.com!not-for-mail
From: "qooroo " <qoorooAT@gmailDOT.comREMOVECAPS>
Newsgroups: comp.soft-sys.matlab
Subject: Re: dynamically creating for loops
Date: Wed, 9 Sep 2009 09:07:04 +0000 (UTC)
Organization: University of Cambridge
Lines: 9
Message-ID: <h87r7o$jub$1@fred.mathworks.com>
References: <h87hf1$q8e$1@fred.mathworks.com> <h87qms$a3o$1@fred.mathworks.com>
Reply-To: "qooroo " <qoorooAT@gmailDOT.comREMOVECAPS>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1252487224 20427 172.30.248.38 (9 Sep 2009 09:07:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 9 Sep 2009 09:07:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1300190
Xref: news.mathworks.com comp.soft-sys.matlab:569186


of course if n > 500 then you'll get

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.

I'd always avoid recursion if I could.

-qooroo