Segmentation of multiples ecg signals
3 ビュー (過去 30 日間)
古いコメントを表示
Hello! I am working on ECG signal classification. During pre processing stage. I need to segment my signal into 2 sec duration length (2000 samples, frequency 1000 hertz). The problem is I have to do this for multiple signals (whole dataset is consisting of 1000 signals) and save them to use for further processing. I am not getting how to apply loop to get this task done.
Please help!
for one signal I am using these approaches.
First one:
vb = buffer((sig, numel(sig/5)))
vb= vb.'
Second one:
before=250;
after= 400;
nn = length(qrs_amp);
beat = zeros(length(qrs_amp) - 1, 651);
for i=2:nn-2
beat(i,:)=ecg_h(qrs_amp(i)-before:qrs_amp(i)+after))
end
where sig = original signal
ecg_h= filtered signal
qrs_amp= R-peak value
0 件のコメント
回答 (1 件)
KALYAN ACHARJYA
2021 年 6 月 20 日
編集済み: KALYAN ACHARJYA
2021 年 6 月 20 日
First Part:
load ecg_data_file
Read the y axis data (mV) as another column data & store in new variable, say ecg_data. The time vector (x data in ms) is generally linearly spaced, so you can consider the same as indexing. If your time scale unit is second, consider 2 spacing, otherwise 20 spacing for ms time unit.
Suppose the time scale in seconds
ecg_data=data(:,2);
len=length(ecg_data)/2; % Considering length of ecg_data as even number
ecg_segment=mat2cell(data,2*ones(1,len),1);
The ecg_segment as follows
ecg_segment=
...×1 cell array
{2×1 double}
{2×1 double}
{2×1 double}
{2×1 double}
{2×1 double}
.......
Here individual cell elements represent segment of the signal. Aferwards you can use the cell elements for further processing or save the data also.
Think: You may consider the 3 dimensional cell array to store the segment of the ecg in multiple planes based on signal number, which is quite easy to handle on Matlab processing. But in case of save in excel or otherways you have to decide.
Second Part:
There the multiple threads to call the multiple files/mat files/text/images. You can replicate the same just by changing the the file format extention name and local path of the files.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で ECG / EKG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!