CELL2UITABLE | Display cell array in customizable uitable

Versión 1.5.0.0 (4,57 KB) por Bob Spunt
Display cell array in properly sized uitable with menu option to print to CSV
732 descargas
Actualizado 4 jul 2017

This is simple tool for presenting a cell array in a properly sized uitable. Option to customize column names and table title. Moreover, table figure menu will have the option to print the cell array to a CSV file.
USAGE: h = cell2uitable(data, varargin)
h: struct containing
.fig: handle to parent of uitable
.tab: handle to uitable
.menu: handle to uimenu (if present)
__________________________________________________________________________
NECESSARY ARGUMENT

data: cell array to present
__________________________________________________________________________
OPTIONAL ARGUMENTS

NOTE: These should be entered as ['name', value] argument pairs, which are parsed based on identifying case-insensitive matches to one of the argument names listed below. Partial matches are OK as long as only one match exists in the set of optional arguments. (For instance, 'fonts' matches only 'fontsize' below and is thus valid, whereas 'font' matches both 'fontsize' and 'fontname' and wll throw an error.) Each argument has a default value specified at the beginning of the function. To view the current defaults in the command window, run CELL2UITABLE with no arguments.

parent: handle to parent (creates new fig if empty)
colnames: cell array of column names
rownames: cell array of row names
rowstriping: 'on' | 'off'
fontsize: font size for table contents
fontname: font name for table contents
rearrangeablecols: 'on' | 'off'
oversizecolfactor: factor to mulitply auto-computed column width (useful for making all cell contents visible)
addsaveuimenu: logical flag to include/exclude uimenu for saving
editable: used to set 'ColumnEditable' property of uitable
backgroundcolor: uitable background color
foregroundcolor: uitable foreground color
emptypadsize: if >0, pads with that # empty editable rows/cols
__________________________________________________________________________
EXAMPLE USAGE

mydata = num2cell(randn(20, 3));
mycolnames = {'Col 1' 'Col 2' 'Col 3'};
myrownames = repmat({'Row 1'}, size(mydata, 1), 1);
h = cell2uitable(mydata, 'coln', mycolnames, 'rown', myrownames);

Citar como

Bob Spunt (2024). CELL2UITABLE | Display cell array in customizable uitable (https://github.com/spunt/cell2uitable), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2014b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!

No se pueden descargar versiones que utilicen la rama predeterminada de GitHub

Versión Publicado Notas de la versión
1.5.0.0

silly typo = silly typo who?

1.4.0.0

several new optional arguments allowing customization of the created uitable
added auto column width determination for better display of cell contents
updated description

1.3.0.0

Fixed typo.

1.1.0.0

Improved input checking.

1.0.0.0

Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.