The WFDB Toolbox for MATLAB/Octave is a collection of functions for reading, writing, and processing physiologic signals in the formats used by PhysioNet (see README for details).
We need to find a way to store baseline values in files generated by WRSAMP.
The current implementation results in signals with different physical values if we convert
the raw data to physical units through RDSAMP's rawUnits argument.
Example:
N=100;
[ecg,Fs,tm]=rdsamp('100s',1,N,[],4);
[siginfo]=wfdbdesc('100s');
wrsamp(tm,ecg(:,1),'100s_copy',Fs,200,siginfo(1).Format);
%Get signal in physical units
[ecg1]=rdsamp('100s',1,N);
[ecg2]=rdsamp('100s_copy',1,N);
err=sum(ecg1 ~= ecg2)
!cat 100s_copy.hea
100s_copy 1 360 100
100s_copy.dat 212 200 12 0 995 -32689 0 col 1
!cat 100s.hea
100s 2 360 21600
100s.dat 212 200 11 1024 995 21537 0 MLII
100s.dat 212 200 11 1024 1011 -3962 0 V5
#69 M 1085 1629 x1
# Aldomet, Inderal
#Produced by xform from record 100, beginning at 0:0
I guess people can use mat2wfdb for now. I'll put a message at the top of the header pointing users to mat2wfdb. In the future I may add that functionality to the C wrsamp.
We need to find a way to store baseline values in files generated by WRSAMP. The current implementation results in signals with different physical values if we convert the raw data to physical units through RDSAMP's rawUnits argument.
Example: