From: Naveen Cherala on
try pause in while(1) loop
E.g.
while(1)
..
..
update data
plot(x,data)
pause(time)
..
..
end


Richard <cqxu456(a)hotmail.com> wrote in message <a57dbf86-623a-4fea-8f9a-3c746a8655a5(a)f18g2000prf.googlegroups.com>...
> On Jul 31, 12:23 am, Kamil <kamilcz...(a)gmail.com> wrote:
> > Hey,
> >
> > I am trying to use matlab for "real time" processing and display.
> >
> > I would like to update a plot with new data and have that data be
> > appended to a plot.
> >
> > This will be a 3d plot using plot3 command.  A constant X axis will be
> > defined for this figure and I would like to plot until the X axis is
> > completely filled up.  8 lines will be drawn on this plot.
> >
> > This was my plan...
> > 1) initialize the plot with some initial data.  Also set the X axis to
> > the maximum length desired.
> > 2) Update the plot
> >      2.1) get current data on plot using get(h, 'Xdata')
> >      2.2) make a new variable the length of oldXdata and newXdata.
> >      2.3) concat oldXdata with newXdata
> >      2.4) redraw
> >
> > is there a simpler way to do this?  I am getting lost because the
> > Xdata for a plot3d is a cell array and im having trouble combining the
> > newXdata with the oldXdata.
> >
> > Any help would be appreciated,
> >
> > Thanks,
> > Kamil
>
> Try
> >>comet(xdata,ydata,zdata )
> with loop. For 2D data, "comet" plots in real time. For 3D data, no
> idea!
>
> Cheers!
> Richard