バージョン (6.17 KB) 作成者: Eli Duenisch
Converts matrices, cells and MATLAB tables to LaTex table code. Allows format,pivot,col/row headers.
ダウンロード: 17.9K
更新 2016/10/20

Converts matrices, cells or MATLAB tables to LaTeX table code. Easy to use and very flexible:
- takes MATLAB matrices, cells or tables as input
- gives code for a LaTeX table containing your data as output
- handles numeric and text/string data
- easy including in your code for automation
- easy direct saving as a LaTex document (see example 2 in runExamples.m)
Optional features are:
- table positioning
- column/row labels
- column/row-wise formatting (like setting the number of digits etc.)
- pivoting the table (90 degree rotation making columns rows and vice versa)
- setting the default symbol for NaN values
- LaTeX column alignment
- LaTeX table borders, caption, label
- output a complete LaTeX document instead of a plain table
A little example:[1,3;4,2]; % set up data
latexTable(input) % obtain LaTeX code
For further details and examples can be found in latexTable.m and runExamples.m


Eli Duenisch (2024). latexTable (, GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2013b
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート

new feature for positioning the table in your LaTex document, addional examples, some minor fixes

added for github, added BSD 2 license comment (the default license at MathWorks File Exchange)

minor changes

updated description

updated summary

fixed git repo upload

using github repo next trial

updated version date, switched back from github to regular upload

function can now process data values given as strings (code proposed by JMP Phillips)

it is now possible to use MATLAB tables without row and/or column names

Fixed output when no row and/or column labels are set. Thank you Dimitar Atanasov for mentioning!

changed title

Improved documentation.

Changed file descriptions.

Some changes in the documentation.

This update enables pivoting of the table (=transpose data and labels). The data format definition can now be applied column- or row-wise.

It is now possible to use the new MATLAB datatype 'table' as data input.
Column headers are added as an optional input.

Updated comments in example script

Changes in comment section

Added a script to run an simple example of latexTable.m

Now you can set a replacement value for NaNs in your MATLAB data, e.g. use an empty string for a blank space or '-' for a minus sign.

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。