Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Need Help With Plot

Subject: Need Help With Plot

From: conplot

Date: 2 Jul, 2008 19:35:18

Message: 1 of 6

Hello,

Can someone please explain me how can I plot data on real time , so when I will watch the figure window I'll see the graph being updated while the data is still incoming ( like a monitor ) ?

Thanks .

Subject: Need Help With Plot

From: Rick Rosson

Date: 2 Jul, 2008 19:51:09

Message: 2 of 6

Hello,

I have a question: Do you have access to Simulink, or MATLAB only?

Rick



"conplot" <conplot@gmail.com> wrote in message
news:4235818.1215027348462.JavaMail.jakarta@nitrogen.mathforum.org...
> Hello,
>
> Can someone please explain me how can I plot data on real time , so when I
> will watch the figure window I'll see the graph being updated while the
> data is still incoming ( like a monitor ) ?
>
> Thanks .


Subject: Need Help With Plot

From: conplot

Date: 3 Jul, 2008 06:11:44

Message: 3 of 6

Yes, I have access to simulink .

Subject: Need Help With Plot

From: conplot

Date: 3 Jul, 2008 06:33:19

Message: 4 of 6

Since you have mentioned simulink , Is it possible to use the rs232 blockset in a way that i can plot on real-time the data that is being sent to the serial port ?
perhaps using a unit that translate every 8 bits to an integer number and plotting it ?

Thanks

Subject: Need Help With Plot

From: Ankit Desai

Date: 3 Jul, 2008 15:00:05

Message: 5 of 6

conplot <conplot@gmail.com> wrote in message
<24448310.1215066830447.JavaMail.jakarta@nitrogen.mathforum.org>...
> Since you have mentioned simulink , Is it possible to use
the rs232 blockset in a way that i can plot on real-time the
data that is being sent to the serial port ?
> perhaps using a unit that translate every 8 bits to an
integer number and plotting it ?
>
> Thanks

If you are using R2008a, you can use Instrument Control
Toolbox. It provides Simulink Blocks for Serial
Communication (Serial Send and Serial Receive).

However, Serial Blocks are available only in R2008a.

-Ankit

Subject: Need Help With Plot

From: Paul Mennen

Date: 3 Jul, 2008 15:40:19

Message: 6 of 6

> conplot <conplot@gmail.com> wrote
> Can someone please explain me how can I plot data
> on real time , so when I will watch the figure
> window I'll see the graph being updated while the
> data is still incoming ( like a monitor ) ?

Interesting that nobody answered your original question
which seems to be about plotting. Matlab's plot function
is really for plotting static data, but you can use it
to plot moving data in the following way:

1) Plot the first data set (or a dummy one) using "plot".
2) Then as the new data comes in, change the xdata and/or
  ydata properties of the line objects created by plot.

I have several example programs that show moving plots in
Matlab. (To find them, search for "plt" in the file
exchange and look in the demo folder). The examples that
involve dynamic plots are: pltsq, wfall, bounce, movbar,
and dice. (The last one shows how to plot a single data
set as it is growing or being acquired). They all use
"plt" (my alternative to plot) to plot the initial data
set, but they would work with "plot" as well. It's all
about how you change the properties of the line objects
created by plot (or plt).

~Paul

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
serial Ankit Desai 3 Jul, 2008 11:00:15
serial blocks Ankit Desai 3 Jul, 2008 11:00:15
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics