File Exchange

image thumbnail

HGTable - functions for displaying tabular data in a MATLAB list control

version 1.3.0.1 (23.5 KB) by

Uses a standard MATLAB listbox to display multiple columns of data

2 Downloads

Updated

View License

MATLAB's Handle Graphics infrastructure does not provide a control which displays tabular data. In recent versions of MATLAB it is possible to use a Java table to do display such data, but even this can be tricky.
The solution provided here is to use a list control to display the data, putting one row of data on each line, separating columns with bar characters, and using a fixed-width font to ensure that columns are aligned properly. Separate callbacks can be used to receive events when the user selects a row in the list and when a row is double-clicked.

The main limitation of this approach is that only entire rows can be selected, not columns or individual "cells".

Comments and Ratings (3)

Jamuna

Jamuna (view profile)

Hgtable example does not display data in tabular format on linux
help?

David Susanto

It's neat works, without bug so far, without headache

Neha Khanna

On unzipping the files, we find a set of functions which neatly work together to help create a GUI table. How these files work together can be seen in Contents.m. An example is also provided to show how the functions come together.

The negatives -
The example wouldnt work for older versions of matlab (but the rest of the code will).
The function requires the input to be in cell array which contain strings only.

The positives -
Works well, no bugs.
A neat output.
Provides toolbar to print, and save table.

Updates

1.3.0.1

Updated license

1.3

Updated requirements

1.2

Added copyright lines. Changed background colour of table in demo.

1.1

Review

MATLAB Release
MATLAB 7.1.0 (R14SP3)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today