matlab uitable 大小gui关于uitable怎么用

求助:Matlab gui关于uitable怎么用?
<h1 style="color:# 麦片财富积分
新手, 积分 6, 距离下一级还需 44 积分
研究了一下
我是这么做的,我这里的数据仅有两列,每次点addfun只是在GUI中添加一行,表格中的数据手动输入。
Udata = get(handles.uitable1,'data');
n = size(Udata,1);
& &set(handles.uitable1,'data',[0,0]);
&&set(handles.uitable,'daa',[U [0,0]]);
<h1 style="color:# 麦片财富积分
有一点疑问,希望高手帮忙
就是选中表格修改里面的数据后,特别是最后一个数据(即最后一行最后一列的数据),填写后,如果不把鼠标点选到其他位置,使用get(.....,'data'),得到的最后一个数据为0...........
感觉很奇怪,每次修改完数据后,都要把鼠标在表格的其他位置点一下,再进行读取。。。请问有没有什么好的方法解决这个问题呢?
<h1 style="color:# 麦片财富积分
uitable在哪里的啊啊,我怎么没有啊啊
<h1 style="color:# 麦片财富积分
关注者: 2
版本的问题
版本不一样,使用的方便程度就不一样。当然版本越新,越方便。
<h1 style="color:# 麦片财富积分
柚籽 发表于
如果是处理数据的话,table proterty editor里面把单元格的格式改为数值。
a = get(handles.uitab ...
请问如何表示表中某一行被选中
<h1 style="color:# 麦片财富积分
有同样的问题!
<h1 style="color:# 麦片财富积分
楼主~求分享,我也需要解决这样的问题
站长推荐 /1
活动地点已更新
Powered by查看: 2907|回复: 8|关注: 0
如何设置uitable在GUI中的位置
<h1 style="color:# 麦片财富积分
新手, 积分 9, 距离下一级还需 41 积分
关注者: 2
我只知道可以用position来设置,但是具体是如何设置的,position里面的四个值分别是什么意思呢?
<h1 style="color:#1 麦片财富积分
关注者: 8
position = [ x軸位置& & y軸位置& &&&物件長度& &&&物件高度 ]
錯誤是成長的機會
逃避是錯誤的決定
面對是最佳的選擇
<h1 style="color:# 麦片财富积分
关注者: 2
那请问一下一般利用uitable如何定位啊?我的是7.1版本,没有uitable这个控件,按照GUIDE上面的位置参数来设置怎么总是不对啊
<h1 style="color:#1 麦片财富积分
关注者: 8
原帖由 flyer_insky 于
10:04 发表
那请问一下一般利用uitable如何定位啊?我的是7.1版本,没有uitable这个控件,按照GUIDE上面的位置参数来设置怎么总是不对啊
能將錯誤訊息及程序貼上來嗎?
如果再 guide 中沒有 uitable
在純 M 語言中應該也不能使用
看看是否要更換版本
[ 本帖最后由 blandly 于
10:16 编辑 ]
錯誤是成長的機會
逃避是錯誤的決定
面對是最佳的選擇
<h1 style="color:# 麦片财富积分
关注者: 2
回复 4# blandly 的帖子
我用h=uitable又可以用,现在调好的,呵呵,多谢你的帮助,只不过里面的设置还是很麻烦
电脑太搓了啊,装个高版本的不知道还跑不跑得动。。。
<h1 style="color:#1 麦片财富积分
关注者: 8
原帖由 flyer_insky 于
10:23 发表
我用h=uitable又可以用,现在调好的,呵呵,多谢你的帮助,只不过里面的设置还是很麻烦
电脑太搓了啊,装个高版本的不知道还跑不跑得动。。。
h=uitable('position',[50 50 500 300],'data',rand(10,6))
這程序在我的可以跑
您測試看看吧,能以的話覆上程序及錯誤訊息會比較好處理
錯誤是成長的機會
逃避是錯誤的決定
面對是最佳的選擇
<h1 style="color:# 麦片财富积分
关注者: 2
回复 6# blandly 的帖子
没有出错信息,我这里也能跑。
就是现在假如说我想让这个表格只能读数不能写入,应该是通过生成的属性表editable来修改吧,但是好像改不了。然后我还想让修改行与列的表头,要如何做呢?
<h1 style="color:#1 麦片财富积分
关注者: 8
&& h=uitable('position',[50 50 500 300],'data',rand(10,6),'ColumnEditable',[true true true true true true true true true true],'RowName',{'11','22','2323','44','55','66','77','88','99','10'})
使用get(h) 獲的物件參數
錯誤是成長的機會
逃避是錯誤的決定
面對是最佳的選擇
<h1 style="color:# 麦片财富积分
关注者: 2
回复 8# blandly 的帖子
好东西,我懂了。非常感谢,呵呵,以后还是要装个高级版本啊
站长推荐 /1
活动地点已更新
Powered byuitable控件_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
uitable控件
上传于||暂无简介
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩3页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢Create 2-D graphic table GUI component
Syntaxuitableuitable('PropertyName1',
value1,'PropertyName2',value2,...)uitable(parent,...)handle = uitable(...)Descriptionuitable creates an empty uitable object
the current figure window, using default property values. If no
figure exists, a new figure window opens. uitable('PropertyName1',
value1,'PropertyName2',value2,...) creates
uitable object with specified property values.
Properties that you do not specify assume the default property values.
page for information about the available properties. uitable(parent,...) creates a uitable object
as a child of the specified parent handle parent.
The parent can be a figure or uipanel handle. If
you also specify a different value for the Parent property,
the value of the Parent property takes precedence.handle = uitable(...) creates a uitable object
and returns its handle.ExamplesCreate a table, provide magic-square data, set column widths
uniformly, and specify the uitable ColumnWidth property
as a cell array: Create a table in the current figure. If no figure
exists, one opens:t =
As the table has no content (its Data property
is empty), it initially displays no rows or columns. Provide data
(a magic square)set(t,'Data',magic(10))
Make the entire table contents visible. Set column
widths to 25 pixels uniformly. Specify the ColumnWidth property
of the table as a cell array. set(t,'ColumnWidth',{25})
Cell arrays that specify ColumnWidth can
contain:One number (a width measured in pixels, as shown here)
or the string 'auto'.A cell array containing a list of pixel sizes having
up to as many entries as the table has columns .If a list of column widths has n entries,
where n is smaller than the number of columns,
it sets the first n column widths only. You can
substitute 'auto' for any value in the cell array
to have the width of that column calculated automatically.&Create a figure and add a table to contain a 3-by-3 data matrix.
The code specifies the column names, row names, parent, and position
of the table:f = figure('Position',[200 200 400 150]);
dat = rand(3);
cnames = {'X-Data','Y-Data','Z-Data'};
rnames = {'First','Second','Third'};
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 360 100]);
&Create a table to contain a 3-by-4 array that contains numeric,
logical, and string data, as follows:First column (Rate):
Numeric, with three decimals (not editable)Second column (Amount):
Currency (not editable)Third column (Available):
Check box (editable)Fourth column (Fixed/Adj):
Pop-up menu with two choices: Fixed and Adjustable (editable)Specify the RowName property
as empty to remove row names from the table.f = figure('Position',[100 100 400 150]);
{6.125, 456.3457, true,
'Fixed';...
510.2342, false, 'Adjustable';...
false, 'Fixed';};
columnname =
{'Rate', 'Amount', 'Available', 'Fixed/Adj'};
columnformat = {'numeric', 'bank', 'logical', {'Fixed' 'Adjustable'}};
columneditable =
[false false true true];
t = uitable('Units','normalized','Position',...
[0.1 0.1 0.9 0.9], 'Data', dat,...
'ColumnName', columnname,...
'ColumnFormat', columnformat,...
'ColumnEditable', columneditable,...
'RowName',[]);
AlternativesYou can add tables to GUIs you create with .More AboutAfter creating a uitable object, you can
set and query its property values using the set and get functions.If the ColumnEditable property is true for
columns you edit, you can change values in a displayed table. By default,
this property is false for all columns. If a noneditable
column contains pop-up choices, only the current choice is visible
(and not the pop-up menu control).If you attempt to create a uitable object
when running MATLAB&#x00AE; on a UNIX[]
system without a Java&#x00AE; virtual machine (matlab
-nojvm) or without a display (matlab &#8211;nodisplay),
no table generates and you receive an error. The CellEditCallback executes
after you edit a value and do any of the following:Type Enter.Click another table cell.Click anywhere else within the table.Click another control or area within the same figure
window.Click another window, click again on the GUI containing
the table (or use Alt+Tab to switch windows), and
then perform any of the above four actions.When the CellEditCallback callback
executes, uitable updates the underlying data
matrix (the table Data property) to contain the
value that the cell now displays.The CellSelectionCallback executes
when you select a table cell or remove one from the current selection
by Ctrl+clicking it. Clicking a cell without pressing
any key selects it and deselects all currently selected cells. You
can define a range of table cells by Shift+clicking
an unselected cell after selecting one or more cells. The callback
provides event data that identifies the rows and columns of all cells
in the current selection. You cannot select table cells programmatically. Directly clicking
cells is the only method of selection.
See Also |
[] UNIX is a registered
trademark of The Open Group in the United States and other countries.
欢迎转载,转载请注明来自:
与matlab uitable用法相关的文章
版权归所有|
友链等可联系 |MATLAB GUI视频教程:uitable的使用方法_图文_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
MATLAB GUI视频教程:uitable的使用方法
上传于||文档简介
&&M&#8203;A&#8203;T&#8203;L&#8203;A&#8203;B&#8203; &#8203;G&#8203;U&#8203;I&#8203;视&#8203;频&#8203;教&#8203;程&#8203;:&#8203;u&#8203;i&#8203;t&#8203;a&#8203;b&#8203;l&#8203;e&#8203;的&#8203;使&#8203;用&#8203;方&#8203;法
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩8页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢

我要回帖

更多关于 matlab uitable 颜色 的文章

 

随机推荐