I am trying to show that two matrices are the same.
One matrix has random elements drawn from a distribution of ${(-0.75,-0.25,0,0.25,0.75,0.95)}$, while the other has values with imaginary parts too (but they are close to the entries ${(-0.75,-0.25,0,0.25,0.75,0.95)}$). In fact, they need to be the same when I approximate the matrix with imaginary elements.
I have tried both N and Round but, when using Round, the elements of the matrix with complex entries approximate to 1, -1.
Hence, what command shall I use so that the two matrices are the same?
Reto only get the real parts of the second matrix? – Carl Lange Feb 19 '19 at 22:37MatrixFormshould be used only for display: https://mathematica.stackexchange.com/questions/3098/why-does-matrixform-affect-calculations and https://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users/18395#18395 detail that.A == Bis what you're looking for. – Carl Lange Feb 19 '19 at 22:56