HOW to read physionet datas in matlab? erors with rdsamp?

38 views (last 30 days)
hi. I have read the data with this command : record_list=physionetdb('incartdb');record_list(1:888)' and it shows the data base but i can not save them and do the nest steps on them. i use this command : [tm,signal]=rdsamp(record_list{1});signal(1:888,1) and i get erros what can I do?

Answers (1)

Star Strider
Star Strider on 25 May 2014
The rdsamp routine is not a MATLAB function and is not intended to be used with MATLAB.
From the documentation for rdsamp:
  • rdsamp reads signal files for the specified record and writes the samples as decimal numbers on the standard output. ’
So once you read them, they’re sitting somewhere on your computer. I haven’t done C programming in a while, so I don’t remember what ‘standard output’ is. (I suspect it’s a file on your HDD, but I have no idea what it would be called. If you want it output as a ‘.csv’ file, search for ‘.csv’ files on your computer.) I looked through the C-code for it, but left as mystified as I began.
I suggest you explore Software for Matlab and Octave on the PhysioNet site. It may have the routines you need.
Since the documentation for rdsamp seems to me to leave much unsaid, you might want to e-mail the author of that code, or the PhysioNet webmaster.
  1 Comment
Theodora Chivu
Theodora Chivu on 10 Dec 2020
Can you use rdsamp to read multiple signals with a for loop?
A=load('RECORDS');
A = string (A);
for i=1:length(A)
[signal,fs,tm] = rdsamp('0'+ A(i));
end

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!