EMGLAB FORUM

EMGLAB FORUM >how to read the clinical data in matlab

  Subject:   how to read the clinical data in matlab
 
From:   Hong-Bo Xie Date:   29 Apr 2009 8:32 pm  
Reply via e-mail to Hong-Bo Xie.  
  Dear all:

There are different data, such as real, synthetic, and clinical data, in EMGLAB. I used the following code to open .bin file in clinical database:

fid = fopen('N2001A02TA01.bin','r');
EMG=fread(fid,'float');

Howver, the data seems is not in correct format. Would please tell me how to read .bin file in clinical database and other data in real, synthetic database.
Thank you in advance,

Hong-Bo Xie
  >> Reply to this message  

  Subject:   Re: how to read the clinical data in matlab
 
From:   Kevin McGill Date:   30 Apr 2009 6:40 pm  
Reply via e-mail to Kevin McGill.  
  Hi Hong-Bo,

The problem is that different investigators store their data files in different formats. Each file in the emglab database has an associated WFDB header file (.hea) that describes the format of the file.

We have posted a matlab function "getdata" at http://www.emglab.net/utilities/getdata that you can use to read the files into Matlab. The function uses other emglab functions as well, so you must first download EMGLAB v 1.0. Then download getdata and put it into the emglab directory.

Then you can use this code to read in the file:

[EMG, rate] = getdata ('N2001A02TA01.bin');

EMG will be the data, and rate will be the sampling rate.

The function will open the .hea file, and use the information there to correctly read the .bin file. The function should work for any file from the database, as long as you have the .hea file as well as the data file.

Good luck,
Kevin McGill



Hong-Bo Xie wrote:
>Dear all:
>
>There are different data, such as real, synthetic, and clinical data, in EMGLAB. I used the following code to open .bin file in clinical database:
>
>fid = fopen('N2001A02TA01.bin','r');
>EMG=fread(fid,'float');
>
>Howver, the data seems is not in correct format. Would please tell me how to read .bin file in clinical database and other data in real, synthetic database.
>Thank you in advance,
>
>Hong-Bo Xie
>
  >> Reply to this message  

sponsors:
Veterans Affairs Palo Alto Rehabilitation Research and Development Center
|
National Institute of Neurological Disorders and Stroke