<div dir="ltr">Hi list , I am performing CSP on EEG data . I have computed covariance matrices for class 1 and class 2 ( C1 and C2 ) . Now while obtaining  filter coefficients , I  have been suggested to perform generalized eigenvalue decomposition to get filter coefficients such that <span style="font-size:12.8px">W^T C1 W = D and W^T(C1+C2) W = I</span> .(Identity matrix )<div>So , I have used [W,D]=eig(C1,C1+C2) ; where W is my filter matrix , D is the  eigenvalue matrix for C1 . </div><div>after doing so , when I manually try to check if the above two conditions are satisfied , they don't seem so . I have been struggling to find out what went wrong . I would be really grateful if someone could  suggest what I am missing here . Thank you in advance .</div></div>