About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconDisplay Formatted Text Table of Data (Scripts) Publisher's description

displaytable: prints formatted matrix of numerical data with headings

displaytable: prints formatted matrix of numerical data with headings


displaytable(data, colheadings, wid, fms, rowheadings, fid, colsep, rowending)


data: a matrix or cell array, containing the data to be put in the table.
If a matrix the numbers in the table will be printed to using the default
format specifier, or the specifier(s) supplied in fms. data can also be a
cell array containing a mixture of strings and numbers. each cell in this
case can contain only a single scalar value. In this case numbers are
printed as in the matrix case, while strings are printed up to the
maximum width of the column.

colheadings: a cell array of strings for the headings of each column. Can
be an empty cell array if no headings are required.

wid: (optional) scalar or vector of column widths to use for the table.
If scalar, every column will have the same width. If a vector it must be
of the same length as the number of columns. If not supplied, and column
headers are supplied, the width of the widest column header will be used.
If not supplied and column headers are not supplied, a default with of 16
characters is used.

fms: (optional) a string, or cell array of strings containing format
specifiers for formatting the numerical output in each column. If a
single string, the same specifier is used for every column. If not
supplied, the 'g' specifier is used for every column.

rowheadings: (optional) a cell array of strings for the start of each
row. Can be an empty cell array if no row headings are required. If row
headings are supplied, the first column will be made wide enough to
accomodate all the headings.

fid: (optional) the file id to print to. Use 1 for stdout (to print to
the command line).

colsep: (optional) A string or character to insert between every column.
The default separation character is '|'. A table suitible for inclusion
in a LaTeX document can be created using the '&' charcter, for example.

rowending: (optional) An optional string or character to be appended at
the end of every row. Default is an empty string.


colheadings = {'number of projects','sales','profit'};
rowheadings = {'Jimmy Slick', 'Norman Noob'}
data = [3 rand(1) rand(1); 1 rand(1) rand(1)];

To format the first number in each row as a decimal (%d), the second
number %16.4f, and the third as %16.5E do the following:

wid = 16;
fms = {'d','.4f','.5E'};

In this case 16 will be the field width, and '.5E' is what to use for the
fms argument

fileID = 1;

>> displaytable(data,colheadings,wid,fms,rowheadings,fileID);
|number of projec | sales | profit
Jimmy Slick | 3 | 0.4502 | 5.22908E-001
Norman Noob | 1 | 0.9972 | 2.78606E-002


Unfortunately the file exchange does not use a fixed width font, hence the ugly example output above

System Requirements:

MATLAB 7.6 (R2008a)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Display Formatted Text Table of Data (Scripts) Tags:

Click on a tag to find related softwares

Is Display Formatted Text Table of Data (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.