I was looking for ways to convert some MATLAB 2D arrays directly to LaTeX executable code that prints it nicely. While searching I came across this answer
Including a Matlab table in document
The savetable command works for me but the problem is that the matrix is too large to even include in a landscape mode.
There are two solutions I see to this:
- Make the LaTeX understand the size and split wherever necessary to include all in a readable way.
- This is in particular my case — the matrix can still be included if written as number precise up to 2 decimal digits and multiples of 10. But the code generated writes it as a big fraction which, as you can imagine, takes a lot of space.
Any solutions for these two cases? Thank you.
Best Answer
I don't know of a way to solve 1, Matlab knows how to write to latex, but it is not a typesetting software.
However, 2 is possible and quite easy. You could use
latexTable
to convert your data to a table:in latext you now have