CELL2UITABLE | Display cell array in customizable uitable

版本 1.5.0.0 (4.6 KB) 作者: Bob Spunt
Display cell array in properly sized uitable with menu option to print to CSV
732.0 次下载
更新时间 2017/7/4

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 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Migrate GUIDE Apps 的更多信息

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
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

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库