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 Center および File ExchangeLabels and Annotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by