Subscripts and greek letters on a cell array
14 次查看(过去 30 天)
显示 更早的评论
Hello I'm trying to create the following table, in which there are some elements that contain the greek letter µ and also some subscripts such as in K_2HPO_4. However I don't manage to display them in a proper way. Do you have an idea on how to fix it?
sum= (8+8+6+2.9+1.33/2+1.33/2+1.33/2+1.33/2+1.7+1.7);
Peg=num2str(round(8/sum*2/3*2/2.6, 3));
Pep=num2str(round(8/sum*2/3*2/2.6,3));
Trolo=num2str(round(6/sum*2/3*2/2.6,3));
Mix=num2str(round(2.9/sum*2/3*2/2.6,3));
Gluco=num2str(round(1.33/(2*sum)*2/3*2/2.6,3));
Dtt=num2str(round(1.33/(2*sum)*2/3*2/2.6,3));
Cat=num2str(round(1.33/(2*sum)*2/3*2/2.6,3));
GO=num2str(round(1.33/(2*sum)*2/3*2/2.6,3));
ATpp=num2str(round(1.7/sum*2/3*2/2.6,3));
Pkl=num2str(round(1.7/sum*2/3*2/2.6,3));
Streptavidin=num2str(round(1/11*10/sum*2/2.5,3));
Kinesin=num2str(round(10/11*10/sum*2/2.6,3));
Microtubules=num2str(round(0.5/2.6,3));
head={'Compound','Stock solution','% v/v'}
Compound={'M2B'; 'PEG';'PEP';'trolox'; 'MIX'; 'Glucose'; 'DTT';'Catalase';
'Glucose Oxydase'; 'ATP'; 'PKLDH'; 'Streptavidin'; 'Kinesin'; 'Microtubules'};
Vv=['-----';Peg; Pep; Trolo; Mix; Gluco; Dtt; Cat; GO; ATpp; Pkl; Streptavidin; Kinesin; Microtubules];
stock={'80mM Pipes + 2mM MgCl_2 + 1mM EGTA ';'12% w/w';'200 mM';'20 mM in 20mM (K_2HPO_4)';'933 uL M2B + 67 \mu L MgCl_2(1M)';
'300mg/ml in 20mM K_2HPO_4 + 70mM KCl'; '0.5 M';'3.5 mg/ml in 20mM K_2HPO_4 + 100mM KCl';
'20mg/ml in 20mM K_2HPO_4'; '50 mM'; '600-1000 units/mL';'0.352 mg/ml' ;'0.07 mg/mL'; '8mg/mL'};
Vv=cellstr(Vv);
T = table(Compound,stock,Vv);
figure (1)
uitable('Data',T{:,:},'ColumnName',head , 'RowName',T.Properties.RowNames,'Units', 'Normalized', 'Position',[0, 0, 1, 1]);
0 个评论
回答(1 个)
Kiran Felix Robert
2021-2-11
Hi Martina,
You can refer the answer thread here to learn more about displaying Greek characters in the UITABLE/UICONTROL.
Refer the answer here for storing special characters into a string. For Greek letter ‘u’ the example is as follows,
mu = cellstr(char(956));
The above will store it into a cell array.
1 个评论
Walter Roberson
2021-2-11
Note that the HTML approaches are only available for traditional figures and not for uifigure
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Labels and Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!