Convert string into greek letters

조회 수: 9 (최근 30일)
john
john 2012년 6월 12일
Hi,
I have edit text in GUI. If I write into edit text for example aplha, is possible to convert string into greek letter?
  댓글 수: 3
john
john 2012년 6월 12일
:)
In matrix UserData.matrix.....is possible to convert string into greek letter and than insert into cell matrix? And also I will make symbolical and numerical calculations.
Now I am using this commands:
1. UserData.matrix(3,1)=num2cell(sym(get(handles.edit5,'string'))); % for load string in one part of code
2. UserData.info(4,1)=num2cell(sym(UserData.matrix{4,1})); % to print string in uitable, this code is in other part of code
3. D(4,1)=sym(UserData.info{4,1});
4. result(4,1)=cellstr(char(D(4,1))); % result is in uitable
john
john 2012년 6월 14일
Or is possible to convert data into greek letter for uitable? So in uitable will be greek letters.

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

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 14일
Try for example
uitable('Data',num2cell(char(945:969).'))
  댓글 수: 24
john
john 2013년 2월 27일
Hi,
could you help me please? This is me code:
vd=size(UserData.info);
for i= 0:vd(1)-4
T = regexprep(cellstr(char(sym(UserData.matrix{4+i,1}))), '([A-Za-z]+)(\d+)', '$1<FONT SIZE=-1>$2</FONT>');
T = regexprep(T, '(Alpha|Beta|Gamma|thetasym|piv|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigmaf|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|upsih|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|bull|hellip|permil|prime|Prime|lsaquo|rsaquo|oline|euro|trade|larr|uarr|rarr|darr|harr|crarr|loz|spades|clubs|hearts|diams|forall|part|exist|empty|nabla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|and|or|cap|cup|int|sim|cong|asymp|ne|equiv|le|ge|sube|supe|sub|sup|nsub|oplus|otimes|perp|sdot)', '&$1;');
result(4+i,1)=strcat('<HTML>',T);
end;
Code makes: if I write for example U1U2, than all numbers are subscript. But I need phi2U2, than everything after "phi" must be subscript, so 2U2 must by subscript.
Thank you
john
john 2013년 4월 23일
Hi, how can I insert sqrt into uitable? for example sqrt(2).
Surd doesn't help.
Thank you

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by