I have an MxN
matrix A
where A
is complex and apparently has some properties which renders a diagonal matrix for A'*A
. A
is also very large (256x16384) so I cannot think of a way to upload it here for reproducing.
In the MATLAB code, I have:
imshow(abs(A'*A),[]);
this produces the following image:
The converted code in python:
tmp=np.dot(A.T,A)
plt.imshow(np.absolute(tmp))
plt.show()
produces:
The diagonal seemed to rotate. Is there any reason for this rotation? Am I doing the conversion correctly?
I guess that you're confusing between the transpose and the conjugate transpose operator.
Matlab to Python:
A.'
A.T
A'
A.conj().T
So change your matlab code or your python code according to your need.