Skip to content

Huge memory requirements in ECG artifact removal #12

@tsieger

Description

@tsieger

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,:));

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions