Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!24g2000yqk.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: for loop into for loop.
Date: Fri, 20 May 2011 04:53:04 -0700 (PDT)
Organization: http://groups.google.com
Lines: 7
Message-ID: <a982d13b-9ab7-4b80-8b6e-18b61a3dcadb@24g2000yqk.googlegroups.com>
References: <ir5dgd$12q$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 137.183.232.24
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1305892384 28918 127.0.0.1 (20 May 2011 11:53:04 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 20 May 2011 11:53:04 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 24g2000yqk.googlegroups.com; posting-host=137.183.232.24; posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:727840

Zack:
I think you need to look into recursive programming.

The function would call itself.  You'd have to pass along the
information as to when the function should "bail out", in other words,
backtrack out or recurse out.