📄 ch11_2_1.htm
字号:
<! Made by Html Translation Ver 1.0>
<HTML>
<HEAD>
<TITLE> 一般方程式 </TITLE>
</HEAD>
<BODY BACKGROUND="bg0000.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/bg0000.gif">
<FONT COLOR="#0000FF">
<H1>11.2.1 一般方程式</H1>
</FONT>
<HR>
<P>
以符号数学解一般方程式和联立方程式的语法如下:
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">solve(f) </FONT>解符号方程式<FONT COLOR=#FF0000 FACE="Times New Roman">f</FONT>。
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">solve(f1,</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">厎</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">,fn)
</FONT><FONT COLOR=#FF0000>解由</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">f1,</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">厎</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">,fn</FONT><FONT COLOR=#FF0000>组成的联立方程式。
<BR>
</FONT>
<P>
<FONT COLOR=#FF0000>我们先定义以下的方程式:</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq1 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x-3=4</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;
% </FONT><FONT COLOR=#FF0000>注意也可写成'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">eq1=x-7</FONT><FONT COLOR=#FF0000>'</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq2 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x*2-x-6=0</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;
% </FONT><FONT COLOR=#FF0000>注意也可写成'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">eq2=x*2-x-6</FONT><FONT COLOR=#FF0000>'</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq3 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x2+2*x+4=0</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq4 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">3*x+2*y-z=10</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq5 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">-x+3*y+2*z=5</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>eq6 = </FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x-y-z=-1</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">;
<BR>
</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>solve(eq1)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans=</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">7</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>solve(eq2)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans=</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">[[3],[-2]]</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">% </FONT><FONT COLOR=#FF0000>原方程式有二个根</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">3,
-2</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>solve(eq3)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans=</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">[[-1+I*3^(1/2)],[-1-I*3^(1/2)]]</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">% </FONT><FONT COLOR=#FF0000>注意实根和虚根的表示式</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>>solve(eq4,eq5,eq6)
% </FONT><FONT COLOR=#FF0000>解三个联立方程式</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans=</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">x = -2, y = 5, z =
-6</FONT><HR>
<A HREF="ch11_2.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch11_2.htm"><IMG SRC="lastpage.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/lastpage.gif" BORDER=0></A>
<A HREF="ch11_2_2.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch11_2_2.htm"><IMG SRC="nextpage-1.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/nextpage.gif" BORDER=0 HSPACE=10></A>
<A HREF="index.html" tppabs="http://166.111.167.223/computer/cai/matlabjc/index.html"><IMG SRC="outline-1.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/outline.gif" BORDER=0 HSPACE=6></A><BR>
<FONT SIZE=2 COLOR=#AA55FF> 上一页 下一页 讲义大纲 </FONT>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -