Welcome, Guest

Author Topic: ECG Data Acquisition and interpretation on Matlab  (Read 3826 times)

Badreddinez

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
ECG Data Acquisition and interpretation on Matlab
« on: March 22, 2015, 12:51:42 PM »
dat

Hello Olimex community,

Well, I tend to acquire the raw ECG signal from the board but it seems tricky to have High and Low portions for a single channel. Any way how to concatenate both of them to a single signal?

Also, I would like to work on one of these alternatives:

1. Acquiring the data on Matlab. But, there will be a problem of data format matching since Serial.Write send the data as ASCII while we need them on Matlab as Float/int/Double.

2. Saving the ECG on text file or MS Excel file.

I hope that could be feasible so we can make interpretation for the ECG on Matlab (mainly Biometric identification).

Thank you so much in advance.

Warm regards,
Badr Eddine

claydergc

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: ECG Data Acquisition and interpretation on Matlab
« Reply #1 on: April 26, 2015, 08:06:09 PM »
I found this post -> https://bakerdh.wordpress.com/2013/01/31/a-first-look-at-the-olimex-eeg-smt/ when surfing the web. I haven't tried it, but it seems that he is getting the signal data and plotting it.

I'm also trying to get the raw signal from the board, but in my case I'm using C++. So, I am using portions of the brainbay source code, exactly in the file ob_eeg.cpp, the function parse_byte_P2() I'm adding this code:

Code: [Select]
char str[256];
unsigned short chn1Value = (PACKET.buffer[0]<<8) + PACKET.buffer[1];
unsigned short chn2Value = (PACKET.buffer[2]<<8) + PACKET.buffer[3];
sprintf_s(str, "chn1: %u, chn2: %u\n", chn1Value, chn2Value);
OutputDebugString(str);

I don't know if that code is correct (I'm still testing it), but I'm getting some integers that seems to correspond to the raw signal of the board.

I hope this can help you.

Regards.

Badreddinez

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: ECG Data Acquisition and interpretation on Matlab
« Reply #2 on: June 20, 2015, 04:49:02 PM »
Done using Matlab and LabVIEW:
https://www.youtube.com/watch?v=Pewk44aJo7g

joe50

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: ECG Data Acquisition and interpretation on Matlab
« Reply #3 on: December 02, 2016, 02:47:01 PM »
Hi Badreddinez

Could you guide us through your youtube video project? What did you use to read the data from the shield EKG directly into matlab and labview?

Thanks for any input