Path: news.mathworks.com!not-for-mail
From: "Dan Haeg" <haegd@msoe.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Display image for 1 second?
Date: Tue, 29 Apr 2008 22:36:02 +0000 (UTC)
Organization: Milwaukee School of Engineering
Lines: 17
Message-ID: <fv87si$4k8$1@fred.mathworks.com>
References: <fv8762$57p$1@fred.mathworks.com>
Reply-To: "Dan Haeg" <haegd@msoe.edu>
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 1209508562 4744 172.30.248.38 (29 Apr 2008 22:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Apr 2008 22:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 475291
Xref: news.mathworks.com comp.soft-sys.matlab:465824



Try this:

figure;
s = load('clown');
t = load('cape');
time = 0;
image(s.X);

%this makes matlab draw the clown
drawnow

tic;
while time < 1
     time = toc;
end
image(t.X)