Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Display image for 1 second?
Date: Tue, 29 Apr 2008 22:33:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <fv87n0$nks$1@fred.mathworks.com>
References: <fv8762$57p$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 1209508384 24220 172.30.248.37 (29 Apr 2008 22:33:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Apr 2008 22:33:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869596
Xref: news.mathworks.com comp.soft-sys.matlab:465823



"Elle We" <petit.etoile@gmail.com> wrote in message <fv8762
$57p$1@fred.mathworks.com>...
> I need to write a function such that an image is 
displayed 
> for 1 second before showing another
> I used tic toc
> 
> s = load('clown');
> t = load('cape');
> time = 0;
> image(s.X);
> tic;
> while time < 1
>      time = toc;
> end
> image(t.X)    
> [x,y] = ginput;
> 
> and when I run run it, I never get the clown but it 
jumps 
> to the cape right away.  I tried it with "while time < 
15" 
> and it would wait 15 seconds before a picture of the 
cape 
> pops up--I never get the clown.  Thanks in advance for 
the 
> help

pause(1)