필터 지우기
필터 지우기

How to show symbolic object in uitable?

조회 수: 2 (최근 30일)
john
john 2011년 11월 2일
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);

채택된 답변

Walter Roberson
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
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'
john
john 2011년 11월 3일
Big Thank You Mr. Walter Roberson,
cellstr(char(a)) is the best command ever :-).
Thank You so much again
Now my program works great, I put in uitable "symbolic object", and than I show "symbolic object" in other uitable

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by