# How to obtain a meaningful group delay graph using matlab

Problem: I'm trying to analyze the behavior of an FIR filter with the following impulse response/kernel:

Using Matlab's function grpdelay(myKernel,length(myKernel)), I obtained the following figure:

Based on my limited knowledge the graph is not correct since it contains negative values. Is my understanding correct? If it is, how could I go about obtaining a more accurate group delay graph?

Code:

    onePulseRun20 = dlmread("C:\Users\agusfrpa\Pictures\singlePulseRun20.txt");

%y is averaged one pulse data
y = mean(onePulseRun20,1);
pulse = twoPulseRun21(1,:);

myFilter = conj(fft(y))./(abs(fft(y)).^2+.3);
myKernel = real(ifft(myFilter));
myKernel = myKernel(4700:5250);

grpdelay(myKernel, length(myKernel));


• You should read that I think : dsprelated.com/showarticle/69.php . I'm not sure you can use grpdelay() the way you are Jul 25 '17 at 23:13