5.0

5.0 | 1 rating Rate this file 81 downloads (last 30 days) File Size: 11.89 KB File ID: #24766

DataTable

by Paul Mattern

 

17 Jul 2009 (Updated 17 Aug 2009)

Code covered by BSD License  

store data in a table format that supports printing in plain text, Latex, HTML, Wiki,...

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

Download Now | Watch this File

File Information
Description

DataTable objects are used to store data in a table format that is easily expandable, manipulatable and that supports printing in a variety of formats (plain text, Latex, HTML, Wiki; new printing formats can be added without changing any code). The format of numeric table contents (e.g. number of displayed digits) and the alignment of text and numbers can be changed for each column individually.

To use, extract zip-archive and add the extracted folder ('datatablepackage') to your matlab path.

Type 'help DataTable' for more information and examples on how to use DataTable.

The new object-oriented programming in MATLAB 7.6 (R2008a) or higher is required for DataTable to work.

MATLAB release MATLAB 7.6 (R2008a)
Other requirements MATLAB 7.6 (R2008a) or higher
Zip File Content  
Other Files datatablepackage/DataTable.m,
datatablepackage/HTMLTablePrinter.m,
datatablepackage/LatexTablePrinter.m,
datatablepackage/TablePrinterInterface.m,
datatablepackage/TextTablePrinter.m,
datatablepackage/WikiTablePrinter.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
14 Aug 2009 Kevin

I get this error when I try to run the code with the following.

>> table=DataTable();
>> table{1:10,1:10}=3

    10x10 DataTable
??? Undefined function or method 'myformat' for input arguments of type 'cell'.

Error in ==> DataTable>DataTable.printTableBody at 933
            strdata = myformat(this.applyColumnFormat());

Error in ==> DataTable>DataTable.toText at 211
            this.printTableBody(fid, tight, TextTablePrinter(delimiter))

Error in ==> DataTable>DataTable.display at 921
            this.toText();

17 Aug 2009 Paul Mattern

Thanks for the comment. I just submitted the new version and it should be available shortly.

For a quick fix replace line 933 in DataTable.m:
strdata = myformat(this.applyColumnFormat());
by
strdata = this.standardFormat(this.applyColumnFormat());

More infos about the bug: The function "myformat" only exists on my computer and has been replaced by standardFormat in the DataTable class. Unfortunately I did not replace it everywhere.

18 Sep 2009 Matthew  
Please login to add a comment or rating.
Updates
17 Aug 2009

fixed
"Undefined function or method 'myformat' for input arguments of type 'cell'."
error

Tag Activity for this File
Tag Applied By Date/Time
data export Paul Mattern 20 Jul 2009 11:35:55
table Paul Mattern 20 Jul 2009 11:35:55
html Paul Mattern 20 Jul 2009 11:35:55
wiki Paul Mattern 20 Jul 2009 11:35:55
latex Paul Mattern 20 Jul 2009 11:35:55
potw Shari Freedman 11 Sep 2009 11:36:03
 

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