
% lyngby_uis_bat       - Script executed for Ardekani's t-test
%
%       See also LYNGBY, LYNGBY_BAT_TEST, LYNGBY_BAT_GLOBAL,
%                LYNGBY_UI_GLOBAL. 
%
% $Id: lyngby_uis_bat.m,v 1.3 2002/05/08 11:49:03 fnielsen Exp $ 


    % Get t-value
    RESULT_BAT = lyngby_bat_test(PN, XN, 'Delay', BAT_DELAY);
    STRENGTH_BAT = RESULT_BAT; 
    RESULT = RESULT_BAT;    

    dof = size(XN,1) - 2; 
    
    % Lower tail area
    PROB_BAT = lyngby_cdf_t(RESULT_BAT, dof);

    % Two-tailed
    bat_level = lyngby_idf_t(dof, 1-BAT_ERRORLEVEL/2); 
    TRUNK_STRENGTH_BAT = bat_level .* (abs(RESULT_BAT) > bat_level);
