Why MATLAB cannot render $\Beta$ (LaTeX string) in xlabel, ylabel?
7 ビュー (過去 30 日間)
古いコメントを表示
Hello, everone!
By accident I find MATLAB cannot render $\Beta$ (LaTeX string) in xlabel, ylabel? I have set the "interpreter" to "latex". Is this means that MATALB does not support the whole Greek alphabet? I am using MATLAB R2021b (trial version). This is the sample code.
>> xlabel('$\beta$', 'interpreter', 'latex'); ylabel('$\Beta$', 'interpreter', 'latex')
Warning: Error updating Text.
String scalar or character vector must have valid interpreter
syntax:
$\Beta$
Besides, "$\Gamma$" works.
Thank you!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/775113/image.png)
0 件のコメント
採用された回答
millercommamatt
2021 年 10 月 22 日
For an upper case beta, just use B and not \Beta.
Here's the characters you can use: https://www.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html
You'll note that characters like an upper case Beta and Epsilon aren't included because you can just use B and E and not \Beta and \Epsilon.
0 件のコメント
その他の回答 (1 件)
Walter Roberson
2021 年 10 月 22 日
MATLAB's latex does not specifically support Greek. Instead, it supports some mathematical symbols, some of which happen to resemble Greek letters. You can see the chart at https://www.mathworks.com/matlabcentral/answers/14751-greek-alphabet-and-latex-commands-not-a-question?s_tid=srchtitle
Generally speaking, it does not bother to have \ codes for letters that are representable in English.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/775133/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/775138/image.png)
A B \Gamma \Delta E Z H \Theta I K \Lambda M N \Xi O \Pi P \Sigma T \Upsilon \Phi X \Psi \Omega
0 件のコメント
参考
カテゴリ
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!