3.8

3.8 | 5 ratings Rate this file 19 Downloads (last 30 days) File Size: 282.43 KB File ID: #14453
image thumbnail

Printing Variables to HTML Tables in Published Code

by Ned Gulley

 

28 Mar 2007 (Updated 15 Jun 2009)

This file lets you display variables as HTML tables in your published MATLAB files.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

One often-requested feature for Cell Mode publishing is to have a command that simply displays the output of a MATLABĀ® variable as a table. This file shows how to do that.

Acknowledgements
This submission has inspired the following:
im2html.m
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
25 Jan 2008 kwadwo Dompreh

couldn't output the tables when used

06 Jan 2009 Johanne Hammervold

Hi!
This seems to be exactly what I need to solve a certain problem with my script. Is it any way to use this code on Matlab R2008b ?

Johanne

23 Feb 2009 Brian

This did what I was looking for. I needed to publish an HTML table in a web page. I modified it for my purposes so I could input a format string instead of a precision.

28 Aug 2009 Daniel Armyr

Awsome potential, but it eems to depend on a function called nanmin which is not included in basic Matlab. Either include an implementation, or post a link to an implementation that is compatible.

06 Nov 2009 Herve

The nanmin.m and nanmax.m files can be downloaded here :
http://www.mathworks.com/matlabcentral/fileexchange/6837-nan-suite
It could be nice if Ned adds these two files in his distribution.

12 Jun 2011 Alexander Brodsky

great work.
also I had a problem with displaying table with other display options. for example when I used disp, fprintf, sprintf after or before making html table function, the table not generated in HTML file. For example:
makeHtmlTable(Mat);
disp('Hello World')

do you met this before and how to overcome it ?
thanks

Please login to add a comment or rating.
Updates
10 Aug 2007

New publishing functionality simplifies the code.

12 Jun 2009

Minor formatting change.

12 Jun 2009

Fix copyright line.

15 Jun 2009

Updated copyright line.

Tag Activity for this File
Tag Applied By Date/Time
html Ned Gulley 22 Oct 2008 09:06:15
cell mode Ned Gulley 22 Oct 2008 09:06:15
publishing Ned Gulley 22 Oct 2008 09:06:15
potw Cristina McIntire 07 Nov 2008 13:01:44
pick of the week Jiro Doke 11 Feb 2011 20:11:07

Contact us at files@mathworks.com