帮助中心帮助中心
设置具有 TeX 字符的文本的格式
txt = texlabel(f)
txt = texlabel(f,'literal')
示例
txt = texlabel(f) 将 MATLAB® 表达式 f 转换为可在文本中使用的 TeX 等效项。texlabel 将希腊变量名称(例如 lambda、delta 等)转换成显示为希腊字母的字符向量。txt 输出用作注释函数(如 title、xlabel 和 text)的参量。
f
texlabel
txt
title
xlabel
text
txt = texlabel(f,'literal') 按字面解释希腊变量名称。
全部折叠
绘制一个线条。创建包含 TeX 字符的文本,并将文本添加到线图中。
plot((1:10).^2) txt = texlabel('lambda12^(3/2)/pi - pi*delta^(2/3)'); text(3,90,txt)
如果包括 'literal' 参量,则 texlabel 会按字面解释希腊变量名称。将变量名称的字面文本添加到线图中。
'literal'
text(4,60,texlabel('lambda12^(3/2)/pi - pi*delta^(2/3)','literal'))
输入 MATLAB 表达式,指定为字符向量或字符串标量。
示例: 'theta (degrees)'
'theta (degrees)'
在 R2006a 之前推出
text | title | xlabel | ylabel | zlabel
ylabel
zlabel
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office