Path: news.mathworks.com!not-for-mail
From: "Elle We" <petit.etoile@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Display image for 1 second?
Date: Tue, 29 Apr 2008 22:24:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <fv8762$57p$1@fred.mathworks.com>
Reply-To: "Elle We" <petit.etoile@gmail.com>
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 1209507842 5369 172.30.248.38 (29 Apr 2008 22:24:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Apr 2008 22:24:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1371380
Xref: news.mathworks.com comp.soft-sys.matlab:465819



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