<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168483</link>
    <title>MATLAB Central Newsreader - Display image for 1 second?</title>
    <description>Feed for thread: Display image for 1 second?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 29 Apr 2008 22:24:02 -0400</pubDate>
      <title>Display image for 1 second?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168483#429473</link>
      <author>Elle We</author>
      <description>I need to write a function such that an image is displayed &lt;br&gt;
for 1 second before showing another&lt;br&gt;
I used tic toc&lt;br&gt;
&lt;br&gt;
s = load('clown');&lt;br&gt;
t = load('cape');&lt;br&gt;
time = 0;&lt;br&gt;
image(s.X);&lt;br&gt;
tic;&lt;br&gt;
while time &amp;lt; 1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time = toc;&lt;br&gt;
end&lt;br&gt;
image(t.X)    &lt;br&gt;
[x,y] = ginput;&lt;br&gt;
&lt;br&gt;
and when I run run it, I never get the clown but it jumps &lt;br&gt;
to the cape right away.  I tried it with &quot;while time &amp;lt; 15&quot; &lt;br&gt;
and it would wait 15 seconds before a picture of the cape &lt;br&gt;
pops up--I never get the clown.  Thanks in advance for the &lt;br&gt;
help</description>
    </item>
    <item>
      <pubDate>Tue, 29 Apr 2008 22:33:04 -0400</pubDate>
      <title>Re: Display image for 1 second?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168483#429477</link>
      <author>Scott Burnside</author>
      <description>&quot;Elle We&quot; &amp;lt;petit.etoile@gmail.com&amp;gt; wrote in message &amp;lt;fv8762&lt;br&gt;
$57p$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I need to write a function such that an image is &lt;br&gt;
displayed &lt;br&gt;
&amp;gt; for 1 second before showing another&lt;br&gt;
&amp;gt; I used tic toc&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; s = load('clown');&lt;br&gt;
&amp;gt; t = load('cape');&lt;br&gt;
&amp;gt; time = 0;&lt;br&gt;
&amp;gt; image(s.X);&lt;br&gt;
&amp;gt; tic;&lt;br&gt;
&amp;gt; while time &amp;lt; 1&lt;br&gt;
&amp;gt;      time = toc;&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; image(t.X)    &lt;br&gt;
&amp;gt; [x,y] = ginput;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; and when I run run it, I never get the clown but it &lt;br&gt;
jumps &lt;br&gt;
&amp;gt; to the cape right away.  I tried it with &quot;while time &amp;lt; &lt;br&gt;
15&quot; &lt;br&gt;
&amp;gt; and it would wait 15 seconds before a picture of the &lt;br&gt;
cape &lt;br&gt;
&amp;gt; pops up--I never get the clown.  Thanks in advance for &lt;br&gt;
the &lt;br&gt;
&amp;gt; help&lt;br&gt;
&lt;br&gt;
pause(1)</description>
    </item>
    <item>
      <pubDate>Tue, 29 Apr 2008 22:36:02 -0400</pubDate>
      <title>Re: Display image for 1 second?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168483#429478</link>
      <author>Dan Haeg</author>
      <description>Try this:&lt;br&gt;
&lt;br&gt;
figure;&lt;br&gt;
s = load('clown');&lt;br&gt;
t = load('cape');&lt;br&gt;
time = 0;&lt;br&gt;
image(s.X);&lt;br&gt;
&lt;br&gt;
%this makes matlab draw the clown&lt;br&gt;
drawnow&lt;br&gt;
&lt;br&gt;
tic;&lt;br&gt;
while time &amp;lt; 1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time = toc;&lt;br&gt;
end&lt;br&gt;
image(t.X) </description>
    </item>
  </channel>
</rss>

