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.

 採用された回答

Chad Greene
Chad Greene 2015 年 1 月 21 日

0 投票

Does this do what you're looking for?

3 件のコメント

Th Sdr
Th Sdr 2015 年 1 月 21 日
編集済み: Th Sdr 2015 年 1 月 21 日
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?
Chad Greene
Chad Greene 2015 年 1 月 21 日
There is a 'format' option which accepts number formatting just like sprintf. (e.g., %-6.4f)
Th Sdr
Th Sdr 2015 年 1 月 22 日
Got it! Thank you!

サインインしてコメントする。

タグ

質問済み:

2015 年 1 月 21 日

コメント済み:

2015 年 1 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by