I have a lot of $\LaTeX$ matrices, and I want to find their eigenvalues and eigenvectors.
I tried to import them to Mathematica with:
ToExpression["[MATRIX PASTED FROM LATEX]",TeXForm]
This method worked for everything I tried until now, as long as it wasn't a matrix. For some reason, Mathematica thinks of the matrix as some kind of "ExpressionCell" That I know nothing of.
Here is an example of this problem:
Input:
ToExpression["\\begin{matrix}{0} & {0} & {0}\\\\
{\\sqrt{2}} & {0} & {0}\\\\
{0} & {\\sqrt{2}} & {0}
\\end{matrix}", TeXForm]
Output: (I converted it to InputForm so you can see the problem)
ExpressionCell[TraditionalForm[{{TextCell[Row[{ , TextCell[0, InlineFormula], }]],
TextCell[Row[{ , TextCell[0, InlineFormula], }]],
TextCell[Row[{ , TextCell[0, InlineFormula], }]]},
{TextCell[Row[{ , ExpressionCell[2, InlineFormula], }]],
TextCell[Row[{ , TextCell[0, InlineFormula], }]],
TextCell[Row[{ , TextCell[0, InlineFormula], }]]},
{TextCell[Row[{ , TextCell[0, InlineFormula], }]],
TextCell[Row[{ , ExpressionCell[2, InlineFormula], }]],
TextCell[Row[{ , TextCell[0, InlineFormula], }]]}}]]
When I ran the code the matrix looks fine - like a Matrix. But Mathematica just doesn't think of it as a matrix, and therefor can't find it's eigenvalues (or do any kind of calculations).
I'm stuck here. Does anyone how to input matrices into Mathemtica?
Any help would be appreciated!
P.S. I found that I'm not the only one stuck with this problem: