Uitable with greek letters and subscript:

1 次查看(过去 30 天)
Hi, can you help me please? For example I want to show following string into uitable with greek letters and subscript:
L1,alpha4,10.0#L23,alpha4,5.0#car12,alpha6,6.0#L4,alpha4,8.0#
In this string are 4 inductors with symbolic induktances and numeric values. Inductors are devided by character '#'. Individual items of any inductor are devided by character ','. Count of inductor is changing. But order is always the same: name of inductor ',' symbolic induktances ',' numeric value '#'.....
I am using now this code, but it is necessary to change it:
T = regexprep(cellstr(char(sym(UserData.matrix{4,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|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=strcat('<HTML>',T);
Thank you
  1 个评论
john
john 2013-9-23
I changed my code:
T = strrep(char((UserData.matrix{4,1})), ',', 'sbquo');
T = strrep(T,'#','&#35');
T = cellstr(T);
T = regexprep(T, '([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|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=strcat('<HTML>',T);
but numerical value of induction is subscript. Numerical value has to be normal size font....how can I do it?

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by