perceive
perceive copied to clipboard
Huge memory requirements in ECG artifact removal
ECG artifact removal does not scale with BSTD signal length. It is quadratic in signal length. For long signals (hours and more), the code does not finish in several hours or simply crashes by requesting too much memory:
...running cross-correlation on 8104 segments...
...ecg template 1 generated...
Error using bsxfun
Out of memory. Type "help memory" for your options.
Error in corr>corrPearson (line 297)
x = bsxfun(@minus,x,sum(x,1)/n); % Remove mean
Error in corr (line 212)
coef = corrFun(rows,tail,x,y);
Error in perceive_ecg (line 49)
r = corr(corrdata,ecg.proc.template1').^2;
Error in perceive (line 521)
d.ecg{e} = perceive_ecg(raw(e,:));