Include MATLAB output in LaTeX document?

Suppose I have several matrices as an output in MATLAB. Is there a way to include the raw output (nicely formatted) in my LaTeX document?
Thank you.

 Risposta accettata

Chad Greene
Chad Greene il 21 Gen 2015
Does this do what you're looking for?

3 Commenti

Th Sdr
Th Sdr il 21 Gen 2015
Modificato: Th Sdr il 21 Gen 2015
Although it works quite nicely, I still have a problem with the number of decimal digits. In the output .tex, there seems to appear only 2 decimal digits (instead of 4 in my case). Do you know what way I can adjust (line number) the matrix2latex.m file?
There is a 'format' option which accepts number formatting just like sprintf. (e.g., %-6.4f)
Got it! Thank you!

Accedi per commentare.

Richiesto:

il 21 Gen 2015

Commentato:

il 22 Gen 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by