Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: do while
Date: Thu, 15 May 2008 17:57:01 +0000 (UTC)
Organization: Timothy S. Farajian, Inc.
Lines: 19
Message-ID: <g0hthd$m6b$1@fred.mathworks.com>
References: <g0gt2m$h3q$1@fred.mathworks.com> <g0hp1j$k93$1@fred.mathworks.com> <g0hq26$q1o$1@canopus.cc.umanitoba.ca> <g0ht07$k7a$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210874221 22731 172.30.248.37 (15 May 2008 17:57:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 May 2008 17:57:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1272923
Xref: news.mathworks.com comp.soft-sys.matlab:468663



> Alternately, you could use this:
> 
> done = false;
> while ~done
>     % your code
>     if ~condition
>         done = true;
>     end
> end


Or another method

while true
  % your code
  if condition
    break
  end
end