Path: news.mathworks.com!not-for-mail
From: "Stuart Kozola" <skozola@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: plots with for loops..URGENT PLZ
Date: Fri, 16 Nov 2007 10:15:21 -0500
Organization: The MathWorks, Inc.
Lines: 34
Message-ID: <fhkc6a$brv$1@fred.mathworks.com>
References: <fhkbnf$56v$1@fred.mathworks.com>
Reply-To: "Stuart Kozola" <skozola@mathworks.com>
NNTP-Posting-Host: kozolas.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1195226122 12159 172.31.57.127 (16 Nov 2007 15:15:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Nov 2007 15:15:22 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:437936



Try:

help pause

'pause(2)' will pause for two seconds.  You should also look at 'drawnow' if 
your plot does not refresh as fast as you'd hoped.

Stu


"Abinayan Parthiban" <abinayanp@yahoo.co.uk> wrote in message 
news:fhkbnf$56v$1@fred.mathworks.com...
> hi,
> Im starting to learn matlab,and I  have a problem.
> Basically, I have 2 column matrices,
> X=[1;2;3;4;5;6;7],Y=[1;3;5;6;8;7;9]..
> I want to plot them for each coordinates, but I want them
> to plot each coordinate in the graph after a 2 second
> interval. So, the plot looks something like this,
>
>      |                                  |
>      |          ---> after 2 seconds--> |     .(1,3)
>      |  .(1,1)                          |
>      |_______                           |_______
>
> And so, on.. It should be on the same plot, so that it
> looks like an animation.
> I was trying to use the basic plot(x,y) with a for loop,
> and trying to find some kind of a delay function, so that
> it delays the plot by 2 secs. Can anyone please help me on
> this programme. Thanks.
> Abi.