Be the first to rate this file! 38 downloads (last 30 days) File Size: 3.47 KB File ID: #19641

latex_table

by Andrea Vannuccini

 

19 Apr 2008 (Updated 17 Jun 2008)

Code covered by BSD License  

Export data to latex table

Download Now | Watch this File

File Information
Description

This function exports MATLAB array (numerical or a cell array) to LaTeX enviroment tabularx.
The results it's printed to the command window and/or can be saved to a file.
You may choose table width, the numeber of decimals, the type (math or text) and also the title of each column.
For more information: help latex_table

For a rapid example: latex_table()

The result is shown in the screenshot.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
24 Apr 2008

Enhancements
- The result is store in a single variable, no output to command window.
- Open, write and close file only at the end.
- If dec or math_mode have less elements than the columns of var, the last value is used for the remaining columns.

17 Jun 2008

Creates a simple preview of the table

Tag Activity for this File
Tag Applied By Date/Time
data import Andrea Vannuccini 22 Oct 2008 09:58:23
data export Andrea Vannuccini 22 Oct 2008 09:58:23
latex table matrix tabularx cell Andrea Vannuccini 22 Oct 2008 09:58:23
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com