NLM is a patch-based method which is transient-preserving. In ECG, this means that signal peaks can be preserved while other high-frequency noise is suppressed. See "Nonlocal means denoising of ECG signals", B. Tracey and E. Miller, IEEE Transactions on Biomedical Engineering, Vol 59, No 9, Sept 2012, pages 2383-2386.
Added utility file 'lin10.m' that was missing in first submission.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.