String scalar or character vector must have valid interpreter syntax

113 次查看(过去 30 天)
axis ([0,20,0,20])
text(3.0, 8.0,'\fontsize{30} \omega=2 \pi*f=2 \pi*c/ \lamda')
  2 个评论
Walter Roberson
Walter Roberson 2023-1-23
In Modern Greek, the name of the letter is Λάμδα
Unicode uses the (Modern Greek-based) spelling "lamda" in character names, instead of "lambda", due to "the pre-existing names in ISO 8859-7, as well as preferences expressed by the Greek National Body".[18]

请先登录,再进行评论。

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-9-28
编辑:Ameer Hamza 2020-9-28
Here are two options to write this
axis ([0,20,0,20])
text(3.0, 8.0,'$\omega=2 \pi*f=2 \pi*c /\lambda$', ...
'Interpreter', 'latex', ...
'FontSize', 30)
and
axis ([0,20,0,20])
text(3.0, 8.0,'\omega=2 \pi*f=2 \pi*c /\lambda', ...
'Interpreter', 'tex', ...
'FontSize', 30)
  5 个评论
Ameer Hamza
Ameer Hamza 2020-9-28
You placed escape character (\) at unnecessary locations
text(2,2, 'y_{z} = e^{2} = 1+ x+ x^{2}/2!+ x^{3}/3+',...
'Interpreter', 'tex', ...
'FontSize', 20)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by