ET_PDToolkit/PDToolkit/@PDTrial/smooth.m

12 lines
341 B
Mathematica
Raw Normal View History

2018-06-12 14:49:55 +02:00
function[obj] = smooth(obj, settings)
eyes = fieldnames(obj.data);
for e = 1:length(eyes)
eye = eyes{e};
if ~isempty(obj.data.(eye).uncorrected.interpolated)
obj.data.(eye).uncorrected.filtered = conv(obj.data.(eye).uncorrected.interpolated, ones(1,settings.FilterSize), 'same') / settings.FilterSize;
end
end