1

I'm sometimes dealing with matrices up till 20*20 - Is there a way to import these into LaTeX rather than manually typing them via the \begin{matrix} command?

The matrices are usually constructed in MATLAB or Maple - No luck on extracting them from there so far.

So far I have been making screendumps and inserting them as figures, but I would like to utilize the matrix-framework provided in LaTex.

Thank you in advance!

4
  • 1
    import from what? many systems will export their matrices in latex syntax, matlab. mathematica, R etc or just output a csv file and let latex read it via datatool or similar or ... Oct 18, 2017 at 17:57
  • 1
    How is the matrix stored? In a simple text file? What does the matrix contain? Just numbers, symbols, or even entire math formulas? Are the cells separated by whitespace, commas, ampersands, or something else?
    – Mico
    Oct 18, 2017 at 17:59
  • The short answer is yes but we need a minimal working example showing what your matrices look like, both in terms of the input and the expected output.
    – user30471
    Oct 18, 2017 at 18:08

1 Answer 1

2

I found the solution, and as it turns out, it was a quite simple on - so I thought I would share it with you.

MATLAB lets you convert any matrix into LaTeX code by using following command:

In MATLAB

Latex_Matrix = latex(sym(A))

where A is your defined matrix.

In Maple Execute your matrix, right-click the result then "Conversions->LaTeX".

The result should be ready LaTeX code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .