Creating text and LaTeX tables on the fly
This package implements a Matlab class which simplifies the creation of plain text and LaTeX tables.
In contrast to similar implementations, methods are provided to populate the cells of the table one by one.
This is especially suitable to watch the output of algorithms while they are running.
It is possible to skip columns.
Here is a minimal example:
t = mtable('stdout','txt');
t.add_column('iter','ITER','%4d');
t.add_column('sqrt','SQRT','%8.2e');
t.end_definition;
t.print_header;
t.print_separator;
for i=1:10
t.push_data('iter',i);
t.push_data('sqrt',sqrt(i));
if (mod(i,5) == 0)
t.print_separator;
else
t.print_newline;
end
end
t.close;
Zitieren als
Roland Herzog (2024). Creating text and LaTeX tables on the fly (https://www.mathworks.com/matlabcentral/fileexchange/51112-creating-text-and-latex-tables-on-the-fly), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 | Corrected minimal example |