How to show symbolic object in uitable?
2 次查看(过去 30 天)
显示 更早的评论
How can I show symbolic object in uitable?
syms i2,i3 'real';
a=[ 0 0 -i3; 1 2 3];
a(2,2)=-i2;
set(handles.uitable2, 'Data',a);
0 个评论
采纳的回答
Walter Roberson
2011-11-2
You cannot show symbolic objects in a uitable. In uitable, you can only show numbers and text. You can find the text representation of a symbolic object by using char() on the object. But remember, that will return text, not a symbolic object, so you will not be able to use the text as a symbolic object.
6 个评论
Walter Roberson
2011-11-2
uicontrol('Style','text', 'String', cellstr(char(a)) )
(You will want to add a Position parameter in to that of course.)
If you use instead use 'Style', 'edit', be sure to set 'Max' to at least 2. Another hint is if you want non-editable text but you want it to be vertically scrollable, then instead of using 'Style', 'text', use 'Style', 'edit', 'Max', 2, 'Enable', 'disable'
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Variables, Expressions, Functions, and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!