Printing a table to a postscript file.

8 views (last 30 days)
Mikael
Mikael on 25 Jun 2014
Answered: Sean de Wolski on 25 Jun 2014
Hello,
I would like to print a formatted table such as one created using the table function, to a postscript file. The reason for the .ps file is that it will be used to generate a PDF report. Here's an example of a simple table that I've created:
rows = {'rowA'; 'rowB'; 'rowC'; 'rowD'};
col1 = {'a1'; 'b1'; 'c1'; 'd1'};
col2 = {'a2'; 'b2'; 'c2'; 'd2'};
col3 = {'a3'; 'b3'; 'c3'; 'd3'};
col4 = {'a4'; 'b4'; 'c4'; 'd4'};
tab = table(col1, col2, col3, col4, 'RowNames', rows);
The table is displayed in the command window in a nicely formatted manner which I would like to preserve. See it below:
Is there any way to create a figure from this table so that I may print it to a .ps file? I am using ps2pdf in order to generate the PDF. It works perfectly for printing figures.
Thanks!!
Mike

Answers (2)

Jan
Jan on 25 Jun 2014

Sean de Wolski
Sean de Wolski on 25 Jun 2014
One possibility would be to incorporate a
disp(T)
Inside of a script and then publish to PDF.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!