I'm often asked how to include a table of numbers in a figure. While it's possible to use an array of edit boxes, I've always recommended using an ActiveX spreadsheet control as an easier (and more professional looking) solution. Thing is, when I went to actually do it I had a hard time finding an appropriate control and learning how to use it.
Michael Robbins'
graph_and_table is very helpful for anybody who would like to learn how to use ActiveX to embed a table of numbers in a figure. Instead of putting together a complete application, Michael wrote an example application that you can use as the basis for your own work. His code works with 2 different controls, including one that's freely downloadable.
A couple of small notes - since Michael intended this as a tutorial, do NOT just use the code as is. To make sure that you look at the code, he puts dummy data in the table. I also found one small thing that didn't work - the commands to set the font with the free ActiveX control. Just comment out the lines that say "set(h.grid,FONTS,'CourierNew');" and you'll be fine.
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.