
% lyngby_uis_cc        - Script executed for cross-correlation anal.  
%
%       See also LYNGBY, LYNGBY_XCORR, LYNGBY_CC_GLOBAL,
%                LYNGBY_UI_GLOBAL. 
%
% $Id: lyngby_uis_cc.m,v 1.2 2002/05/08 12:03:20 fnielsen Exp $ 


    % Get the cross correlation function
    RESULT_CC = lyngby_xcorr(XN, PN, 'Components', CC_COMPONENTS);
    RESULT = RESULT_CC;
    
    % Set the "Strength" as the maximum of the cross-correlation
    % function
    [STRENGTH_CC, DELAY_CC] = max(RESULT_CC);      
    lag = size(RESULT_CC,1)/2 - 1;
    DELAY_CC = DELAY_CC-lag-1;    
	  

