CELL2UITABLE | Display cell array in customizable uitable
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);
引用格式
Bob Spunt (2024). CELL2UITABLE | Display cell array in customizable uitable (https://github.com/spunt/cell2uitable), GitHub. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!无法下载基于 GitHub 默认分支的版本
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.5.0.0 | silly typo = silly typo who? |
|
|
1.4.0.0 | several new optional arguments allowing customization of the created uitable
|
|
|
1.3.0.0 | Fixed typo. |
|
|
1.1.0.0 | Improved input checking. |
||
1.0.0.0 |