赞
踩
在使用MATLAB绘图时,常常需要在图形上显示数学符号、希腊字母或TeX字符.本文整理了一些常见的符号字符的表示方式,如下表所示:
字符 | 符号 | 字符 | 符号 | 字符 | 符号 |
---|---|---|---|---|---|
\alpha | α \alpha α | \upsilon | υ \upsilon υ | \sim | ∼ \sim ∼ |
\beta | β \beta β | \phi | ϕ \phi ϕ | \leq | ≤ \leq ≤ |
\gamma | γ \gamma γ | \chi | χ \chi χ | \infty | ∞ \infty ∞ |
\delta | δ \delta δ | \psi | ψ \psi ψ | \clubsuit | ♣ \clubsuit ♣ |
\epsilon | ϵ \epsilon ϵ | \omega | ω \omega ω | \diamondsuit | ♢ \diamondsuit ♢ |
\zeta | ζ \zeta ζ | \Gamma | Γ \Gamma Γ | \heartsuit | ♡ \heartsuit ♡ |
\eta | η \eta η | \Delta | Δ \Delta Δ | \spadesuit | ♠ \spadesuit ♠ |
\theta | θ \theta θ | \Theta | Θ \Theta Θ | \leftrightarrow | ↔ \leftrightarrow ↔ |
\vartheta | ϑ \vartheta ϑ | \Lambda | Λ \Lambda Λ | \leftarrow | ← \leftarrow ← |
\iota | ι \iota ι | \Xi | Ξ \Xi Ξ | \uparrow | ↑ \uparrow ↑ |
\kappa | κ \kappa κ | \Pi | Π \Pi Π | \rightarrow | → \rightarrow → |
\lambda | λ \lambda λ | \Sigma | Σ \Sigma Σ | \downarrow | ↓ \downarrow ↓ |
\mu | μ \mu μ | \Upsilon | Υ \Upsilon Υ | \circ | ∘ \circ ∘ |
\nu | ν \nu ν | \Phi | Φ \Phi Φ | \pm | ± \pm ± |
\xi | ξ \xi ξ | \Psi | Ψ \Psi Ψ | \geq | ≥ \geq ≥ |
\pi | π \pi π | \Omega | Ω \Omega Ω | \propto | ∝ \propto ∝ |
\rho | ρ \rho ρ | \forall | ∀ \forall ∀ | \partial | ∂ \partial ∂ |
\sigma | σ \sigma σ | \exists | ∃ \exists ∃ | \bullet | ∙ \bullet ∙ |
\varsigma | ς \varsigma ς | \ni | ∋ \ni ∋ | \div | ÷ \div ÷ |
\tau | τ \tau τ | \cong | ≅ \cong ≅ | \neq | ≠ \neq ̸= |
\equiv | ≡ \equiv ≡ | \approx | ≈ \approx ≈ | \aleph | ℵ \aleph ℵ |
\Im | ℑ \Im ℑ | \Re | ℜ \Re ℜ | \wp | ℘ \wp ℘ |
\otimes | ⊗ \otimes ⊗ | \oplus | ⊕ \oplus ⊕ | \oslash | ⊘ \oslash ⊘ |
\cap | ∩ \cap ∩ | \cup | ∪ \cup ∪ | \supseteq | ⊇ \supseteq ⊇ |
\supset | ⊃ \supset ⊃ | \subseteq | ⊆ \subseteq ⊆ | \subset | ⊂ \subset ⊂ |
\int | ∫ \int ∫ | \in | ∈ \in ∈ | \ o (空格+字母o) | o \ o o |
\rfloor | ⌋ \rfloor ⌋ | \lceil | ⌈ \lceil ⌈ | \nabla | ∇ \nabla ∇ |
\lfloor | ⌊ \lfloor ⌊ | \cdot | ⋅ \cdot ⋅ | \ldots | … \ldots … |
\perp | ⊥ \perp ⊥ | \neg | ¬ \neg ¬ | \prime | ′ \prime ′ |
\wedge | ∧ \wedge ∧ | \times | × \times × | \ 0 (空格+数字0) | 0 \ 0 0 |
\rceil | ⌉ \rceil ⌉ | \surd | √ \surd √ | \mid | ∣ \mid ∣ |
\vee | ∨ \vee ∨ | \varpi | ϖ \varpi ϖ | \copyright | © \copyright c◯ |
\langle | ⟨ \langle ⟨ | \rangle | ⟩ \rangle ⟩ |
在MATLAB绘图中常用于标注图形的函数有:xlabel、ylabel、title、legend、text等。都可以使用上述表格所列希腊字母和数学符号。下面,就text函数举例说明其调用方法。
调用text函数具体使用方法如下:
例1
clear
clc
x = 0:pi/10:2*pi;
y = sin(x);
plot(x, y)
text(0.6, 0.5, '\leftarrow\alpha_2^\beta');
程序运行结果如下:
例2
clear
clc
x = 0:pi/10:2*pi;
y = sin(x);
plot(x, y)
text(0.6, 0.5, '\leftarrow\alpha_2^\beta');
text('Interpreter', 'latex', 'String', '$$\int_0^x\! \int_y dF(u, v)$$', ...
'Position', [3 0.5], 'FontSize', 16)
程序运行结果如下:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。