对于参数方程
\[\left\{ \begin{matrix} x=\phi(t) \\ y=\psi(t) \end{matrix} \right.\]
其导数为
\[\frac{dy}{dx}=\frac{\psi'(t)}{\phi'(t)}\]
求椭圆的参数方程
\[\left\{ \begin{matrix} x=a\operatorname{cos}{t} \\ y=b\operatorname{sin}{t} \end{matrix} \right.\]
所确定的导数 \(\frac{dy}{dx}\) 。
解 在命令窗口中输入下面的命令行
code.matlab
>> syms t a b;
>> fx= a*cos(t);
>> fy= b*sin(t);
>> xt=diff(fx,t);
>> yt=diff(fy,t);
>> dv=yt/xt
dv =
-(b*cos(t))/(a*sin(t))