https://github.com/PerezOrtegaJ/Neural_Ensemble_Analysis
Raw File
Tip revision: 9d37fd031dfbdb4eb69faa449d0a6416267a7d4f authored by Jesús Pérez on 28 July 2020, 20:36:58 UTC
Update README.md
Tip revision: 9d37fd0
Remove_Oscillations.m
% Remove smoothed signal from original
%
% Remove the smoothed loess signal from the original
%
% By Jes?s P?rez-Ortega april-2018

function [smoothed,removed]= Remove_Oscillations(coactivity,percentage)
    if(nargin==1)
        %percentage=0.2;
        percentage=0.01; % 15 min at 1 kH --> 9 s 
    end
    
    removed=smooth(coactivity,percentage,'loess'); % quadratic fit
    smoothed=coactivity-removed;
end
back to top