function w = calFisher(data1, data2)
    [N1, m] = size(data1);
    [N2, m] = size(data2);
    Sw = cov(data1) * (N1 - 1) + cov(data2) * (N2 - 1);
    w = inv(Sw) * (mean(data1 - data2))';
    w = w / norm(w);
    
    