function PlotCenter(KernelFunction,WindowWidth,pColor)
KLength=max(size(KernelFunction));

% iMiddle=1;
% 
% ChKernel=KernelFunction(1);
%     while ( norm(ChKernel)<0.5) && (iMiddle<KLength)
%        ChKernel=KernelFunction(1:iMiddle); 
%        iMiddle=iMiddle+1;
%     end

if mean(KernelFunction)<0
    KernelFunction=-KernelFunction;
end    

 
[MaxVal, iMiddle]=max(KernelFunction);


    %Startpoint=round(WindowWidth/2)-iMiddle 
   % pIndex=-iMiddle/4:1/4:(KLength-iMiddle-1)/4;
   pIndex=(-iMiddle+1)/4:1/4:(KLength-iMiddle)/4;
    plot(pIndex,KernelFunction,pColor);
   
    xlim([-WindowWidth/8 WindowWidth/8]);
    
end