I am trying to implement the SVD of a complex matrix in Matlab (not allowed to use build-in functions, e.g., svd, qr).
I have implemented svd using the Golub-Reiasch method for real valued matrix, however, I am having problem to extend it to a complex matrix.
I am doing following steps in my code:
1- decompose the matrix $A$ to get a bidiagonal matrix $B$.
2- perform QR iterations on $B$ until the super-diagonal entries are small. this step includes Givens rotation.
The code works for real matrix but not for complex. I have implemented the complex version of Givens rotation, however, I have noted that the diagonal entries of $B$ are complex number, whereas I am expecting real numbers.
I would appreciate if someone could advise me how to proceed to implement the svd.