How to plot multiple streams of data in real-time?

Through 3rd party software that came with a Matlab plugin, I am able to collect and call data from a file that is being populated in real time. The data being populated includes heart rate, blood pressure and ECG.
I want to know how to plot this live feed. It is being collected in real time, so ideally all 3 data streams should be plotted on the same time axis.
So far, I can call the file intermittently and see the latest data values in column format.
Thank you

7 Comments

Abdul-Kareem - how are you calling this file intermittently? Have you written a script or function that started a timer that would read data from this file periodically? If so, then with that data you can create three plots on the same figure (see subplot) and just update each plot with new data as you receive it.
Hi,
Sorry for my vagueness, I open this file in Matlab with a "Data = (this is where the directory of the file is)" command. I haven't written a script yet to do it automatically, I can only open it manually at the moment.
Is the latest data appended to the file, or is the file replaced with new data? What is the update rate of the file (by the 3rd party software)? What is the format of the file (can you attach it)?
I believe data is appended. Of the three data streams in the same file, the highest data frequency is 125 Hz, however, I'm not sure if the file is updated that fast by the software. I can't attach the file because it is not in one of this forum's supported formats. It's a .sig file, but the data in it looks like anything you'd expect from a .txt.
You could change the extension to txt and upload the file. Do you have any control over how the file is updated (with respect to update rate, removing old content in file, etc.)?
Hi, sorry for my delay. I can't change the extension or those parameters.
However, I am able to create variables representing the different channels of data within the file. Can't I just use variables to plot the data?
For sure, you can use the variables!

Sign in to comment.

Answers (1)

More details would help. So far, the only thing I can suggest is to check "drawnow".

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Asked:

on 16 Aug 2014

Commented:

on 20 Aug 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!