数学软件: MatlabMatlab 与 Latex
1 数学软件 Matlab —— Matlab 与 Latex
主要内容将符号计算的结果输出到LatexMatlab做图加入数学公式2
2 主要内容 ◼ 将符号计算的结果输出到 Latex ◼ Matlab 做图加入数学公式
符号计算与Latexlatex(符号表达式)syms xf=diff(sqrt(x))latex(f)H=sym(hilb(3))latex(H)3
3 符号计算与 Latex latex(符号表达式) syms x f=diff(sqrt(x)) latex(f) H=sym(hilb(3)) latex(H)
Matlab做图与LatexMatlab做图时可使用text命令在任意指定的地方放置文本text(x,y,string,properties)syms xf=exp(sqrt(x)+2*x)ezplot(f,[0,1])text(0.5,subs(f,x,0.5)+6,'exp(sqrt(x)+2x)')text(0.5,subs(f,x,0.5)+6,'exp(sqrt(x)+2x)', ::'FontSize',12)详细用法见:doctext→>TextProperties4
4 Matlab 做图与 Latex ⚫ Matlab 做图时可使用text 命令在任意指定的地方放置文本 syms x f=exp(sqrt(x)+2*x) ezplot(f,[0,1]) text(0.5,subs(f,x,0.5)+6,'exp(sqrt(x)+2x)') text(x,y,string,properties) text(0.5,subs(f,x,0.5)+6,'exp(sqrt(x)+2x)', . 'FontSize',12) 详细用法见:doc text → Text Properties
Matlab做图与Latex如果需要输入数学符号或数学公式,可以使用text命令的interpreter属性syms xf=exp(sqrt(x)+2*x)ezplot(f,[0,1])text(0.5,subs(f,x,0.5)+6, ::'$e^{\sqrt(x}+2x}$','interpreter','latex')5
5 Matlab 做图与 Latex ⚫ 如果需要输入数学符号或数学公式,可以使用text 命令的 interpreter属性 syms x f=exp(sqrt(x)+2*x) ezplot(f,[0,1]) text(0.5,subs(f,x,0.5)+6, . '$e^{\sqrt{x}+2x}$', 'interpreter','latex')