% In this file some test will be run for checking the routine BiDiag


% Initialize some variables
n=10;
I=sqrt(-1);

disp('1. Arbitrary matrix (standard transform) ---------------')
A=GenNormal(n);
[U,B,V]=BiDiag(A);
disp('Is B bidiagonal, norm of tril(B,-1) and norm of triu(B,2)')
norm(tril(B,-1))
norm(triu(B,2))
disp('Is UAV^* = B, norm of this difference.')
norm(U'*A*V-B)
pause

disp('2. Continue experimenting with the matrices above')
AU=U'*A*U;
AV=V'*A*V;
disp('Is AU complex symmetric (expect NO)')
norm(AU-AU.')
disp('Is AU unitary diagonal similar to complex symmetric')
norm(abs(AU)-abs(AU.'))
