Printing a formatted table
@@ ATTENTION @@
I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.
@@@@
This class allows to display and print a table with arbitrary number of columns.
The first row can be distinguished from others by a HasHeader flag and the column separator string can be customized.
Basic automatic conversion allows to pass common, easily string-representable data types, and optionally sprintf-compatible format strings or callbacks can be passed for either all entries or entry-specific.
Optionally a caption can be added to the PrintTable upon construction, directly taking sprintf-like arguments.
Allows to save the table in the formats 'txt' (plain text), 'tex' (LaTeX tabular) and 'pdf' (Basically using pdflatex on 'tex' output).
The table can easily be transposed and sorted.
In difference to the submission #33717 I make use of classes and have more possibilities regarding output and appearance.
Now a basic automatic $Math$-Environment detection for LaTeX is available.
Citation pour cette source
Daniel Wirtz (2024). Printing a formatted table (https://www.mathworks.com/matlabcentral/fileexchange/33815-printing-a-formatted-table), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Text Files >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > LaTeX >
Tags
Remerciements
Inspiré par : Display Formatted Text Table of Data
A inspiré : rtol/FUND-Global, printtable(content, Name, Value), KerMor/matlabtools, Antoine Equation: GUI, FindInstance
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.19.0.0 | I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.
|
||
1.18.0.0 | Bugfix for PrintTable LaTeX Table generation (printTex would throw an error sometimes) |
||
1.16.0.0 | - Stripping newlines automatically
|
||
1.15.0.0 | - bugfix for $$ wrapping also in txt mode
|
||
1.14.0.0 | -New property "TexMathModeDetection" for cell content wrapping with $$
|
||
1.13.0.0 | Improved compatibility (no more wiggles ~) |
||
1.12.0.0 | Improved automatic TabCharLength computation |
||
1.9.0.0 | - More datatypes handled for "stringification"
|
||
1.8.0.0 | - Added a ctranspose overload
|
||
1.5.0.0 | -Saving to PDF now possible
|
||
1.4.0.0 | Fixed some bugs and added LaTeX format output and optional captions to the PrintTable. |
||
1.0.0.0 |