cyfile / Matlab-base-toolbox

本人使用Matlab基础工具箱所编写的各种代码
1 stars 0 forks source link

latex 模板 #12

Open 213cy opened 7 years ago

213cy commented 7 years ago
% axis off
axis([0 10 0 10]);
axis off
set(gca,'defaulttextInterpreter','latex','defaulttextFontSize',14)

%not support \[ \]
k='F(x)=\int_{-\infty}^x e^{-t^2}dt';
text(0,10,['$',k,'$'])
k='F(x)=\int_{-\infty}^x \frac{1}{\pi AB} e^{-t^2}dt';
text(0,9,['$$',k,'$$'])
k='\phi(t)=\frac{1}{\sqrt{2 \pi}} \int^t_0 e^{-x^2/2} dx';
text(4,9,['$$',k,'$$'])
%%%%%%%%%%%%%%%%
k='\leftarrow x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}';
text(0,8,['$$',k,'$$'])
k='\swarrow ^{x=\sin\theta}';
text(4,8,['$$',k,'$$'])
k='\swarrow\mathop{}^{ y =\tanh \alpha}';
text(6,8,['$$',k,'$$'])
k='\swarrow\mathop{\phantom A}^{ y =\tanh \alpha}';
text(8,8,['$$',k,'$$'])
%%%%%%%%%%%%%%%%%
k='\left(\frac{x^2}{y^3}\right)';
text(0,7,['$$',k,'$$'])
k='\left. \frac{\partial y}{\partial x}\right|^{y_1=4}_{y_1=5}';
text(1,7,['$$',k,'$$'])
%%%%%%%%%%%%%
k='\left[\begin{array}{ c l }1 & 2 \\ 3 & 4  \end{array} \right\}';
text(0,6,['$$',k,'$$'])
%unsupport pmatrix
% k='\begin{pmatrix}1 & 2 \\ 3 & 4  \end{pmatrix} ';
% text(1,5,['$$',k,'$$'])
%%%%%%%%%%%%
k='50 \mbox{ apples} \times 100 \mbox{ apples} =   \mbox{lots of apples}';
text(0,5,['$$',k,'$$'])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
k='\begin{tabular}{ r l } \(10xy^2\) & \(= 5\left(2xy^2\right)\) \\& \(= 5x\left(3xy-y\right)\) \\ & \(= 5xy\)\end{tabular}';
text(0,3,['$$',k,'$$'])

% k='y =\begin{cases} \sin x   &  x<0  \\ x^2 + 2x +4   & 0 \leq x < 1 \\  x^3   & x  \end{cases}';
% text(3,5,['$$',k,'$$'])
k='f(n) = \left\{ \begin{array}{l l} n & \quad \mbox{if $n$ is even}\\ n/2 & \quad \mbox{if $n$ is odd} \end{array}  \right.';
text(0,1,['$$',k,'$$'])
k='\tilde y=\left\{   { {\ddot x    \,\:\;\;\; \mbox{  if $x$ odd}    \atop\widehat{\,\!\bar x+1}\mbox{ if $x$ even} }\atop \widehat{\,\!\bar x+1}\mbox{ if $x$ even} }\right.';
text(4,1,['$$',k,'$$'])
k='y = \left\{ \begin{array}{ll}a & \textrm{if $d>c$}\\b+x & \textrm{morning}\\l & \textrm{day}\end{array}\right.';
text(8,1,['$$',k,'$$'])
213cy commented 7 years ago

un