经过一段时间的资料查阅(也可能是我查阅的范围太小了),得出以下结论。
1. 在simulink中是无法输入LateX公式的,也就是意味着下面这种公式是无法输入的:
2. 能输入的只能是TeX形式的公式,使用TeX标记添加上标和下标,修改字体类型和颜色,并在文本中包含特殊字符。支持以下内容(从MATLAB帮助文件中复制而来):
| Modifier | Description | Example |
|---|---|---|
^{ } | Superscript | 'text^{superscript}' |
_{ } | Subscript | 'text_{subscript}' |
\bf | Bold font | '\bf text' |
\it | Italic font | '\it text' |
\sl | Oblique font (usually the same as italic font) | '\sl text' |
\rm | Normal font | '\rm text' |
\fontname{specifier} | Font name — Set specifier as the name of a font family. You can use this in combination with other modifiers. | '\fontname{Courier} text' |
\fontsize{specifier} | Font size — Set specifier as a numeric scalar value in point units to change the font size. | '\fontsize{15} text' |
\color{specifier} | Font color — Set specifer as one of these colors: red, green, yellow, magenta,blue, black, white, gray, darkGreen, orange, or lightBlue. | '\color{magenta} text' |
\color[rgb]{specifier} | Custom font color — Set specifier as a three-element RGB triplet. | '\color[rgb]{0,0.5,0.5} text' |
| Character Sequence | Symbol | Character Sequence | Symbol | Character Sequence | Symbol |
|---|---|---|---|---|---|
|
|
α |
|
υ |
|
~ |
|
|
∠ |
|
|
|
≤ |
|
|
|
|
χ |
|
∞ |
|
|
β |
|
ψ |
|
♣ |
|
|
γ |
|
ω |
|
♦ |
|
|
δ |
|
Γ |
|
♥ |
|
|
ϵ |
|
Δ |
|
♠ |
|
|
ζ |
|
Θ |
|
↔ |
|
|
η |
|
Λ |
|
← |
|
|
θ |
|
Ξ |
|
⇐ |
|
|
ϑ |
|
Π |
|
↑ |
|
|
ι |
|
Σ |
|
→ |
|
|
κ |
|
ϒ |
|
⇒ |
|
|
λ |
|
Φ |
|
↓ |
|
|
µ |
|
Ψ |
|
º |
|
|
ν |
|
Ω |
|
± |
|
|
ξ |
|
∀ |
|
≥ |
|
|
π |
|
∃ |
|
∝ |
|
|
ρ |
|
∍ |
|
∂ |
|
|
σ |
|
≅ |
|
• |
|
|
ς |
|
≈ |
|
÷ |
|
|
τ |
|
ℜ |
|
≠ |
|
|
≡ |
|
⊕ |
|
ℵ |
|
|
ℑ |
|
∪ |
|
℘ |
|
|
⊗ |
|
⊆ |
|
∅ |
|
|
∩ |
|
∈ |
|
⊇ |
|
|
⊃ |
|
⌈ |
|
⊂ |
|
|
∫ |
|
· |
|
ο |
|
|
⌋ |
|
¬ |
|
∇ |
|
|
⌊ |
|
x |
|
... |
|
|
⊥ |
|
√ |
|
´ |
|
|
∧ |
|
ϖ |
|
∅ |
|
|
⌉ |
|
〉 |
|
| |
|
|
∨ |
|
〈 |
|
© |
3. 如何改变自己定义的块(Block)的输入、输出等内容:
①首先右键点击block,选择Mask中的Edit Mask。

② 修改弹出窗口中的内容并确认,效果如下图所示:

4. 如何输入LateX形式的公式
①在word中输入一个公式![]()
②复制公式,并粘贴为图片形式:
③选择侧边栏中的图像

④新建图片对象之后,右键,选择粘贴图片

⑤得到了如下图片,手动调整到适合的大小。

注:本文测试基于MATLAB2016B。
本文详细介绍了在Simulink环境中如何使用TeX标记输入数学公式,包括上标、下标、字体修改和颜色设置等。同时,提供了如何自定义块(Block)的输入输出内容的方法,以及将LaTeX公式转化为图片插入Simulink的步骤。
341

被折叠的 条评论
为什么被折叠?



