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 件のコメント

Geoff Hayes
Geoff Hayes 2014 年 8 月 16 日
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.
Abdul-Kareem
Abdul-Kareem 2014 年 8 月 16 日
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.
Geoff Hayes
Geoff Hayes 2014 年 8 月 16 日
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)?
Abdul-Kareem
Abdul-Kareem 2014 年 8 月 16 日
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.
Geoff Hayes
Geoff Hayes 2014 年 8 月 16 日
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.)?
Abdul-Kareem
Abdul-Kareem 2014 年 8 月 20 日
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?
Geoff Hayes
Geoff Hayes 2014 年 8 月 20 日
For sure, you can use the variables!

サインインしてコメントする。

回答 (1 件)

Ahmet Cecen
Ahmet Cecen 2014 年 8 月 16 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeElectrophysiology についてさらに検索

質問済み:

2014 年 8 月 16 日

コメント済み:

2014 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by