📄 ch11_1_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.1.1 符号表示式</H1>
</FONT>
<HR>
<P>
在<FONT FACE="Times New Roman">MATLAB</FONT>中是将一符号表示式储存唯一字串<FONT FACE="Times New Roman">
(character string)</FONT>,即是以二个单引号之内的表示式来定义其为
一符号式,例如<FONT FACE="Times New Roman">
</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">tan(y/x)</FONT><FONT COLOR=#FF0000>'</FONT><FONT FACE="Times New Roman">,</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">
</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x^3
- 2*x^2 + 3</FONT><FONT COLOR=#FF0000>'</FONT><FONT FACE="Times New Roman">,</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">
</FONT><FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">1/(cos(angle)+2)</FONT><FONT COLOR=#FF0000>'</FONT><FONT FACE="Times New Roman">
</FONT>的三个式子。<BR>
<P>
在一符号表示式中,需要定义所谓的独立变数。如果未曾事先指定何者为独立变数,<FONT FACE="Times New Roman">MATLAB</FONT>会自行决定。
而它所决定变数的原则如下:它会挑选一个除了<FONT COLOR=#FF0000 FACE="Times New Roman">i</FONT>和<FONT COLOR=#FF0000 FACE="Times New Roman">j</FONT>之外而在字母上最接近<FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>的小写字元;如果在式子中并无
上述字元,则<FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>会被视为预设的独立变数。函数<FONT COLOR=#FF0000 FACE="Times New Roman">symvar(s)</FONT><FONT FACE="Times New Roman">
</FONT>可以用已决定何者为独立变数。请看以下的例子:<BR>
<P>
expression S symvar(S)
<P>
<FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">tan(y/x)</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>
<P>
<FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x^3-2*x^2+3</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>
<P>
<FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">1/(cos(angle)+2)</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>
<P>
<FONT COLOR=#FF0000>'</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">3*a*b-6</FONT><FONT COLOR=#FF0000>'
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">b<BR>
</FONT>
<P>
MATLAB提供了一个函数<FONT COLOR=#FF0000 FACE="Times New Roman">ezplot</FONT><FONT FACE="Times New Roman">
</FONT>可以画单变数的符号式,其预设的独立变数的范围是<IMG SRC="img00003-8.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img11/img00003.gif">。它的语法为<FONT FACE="Times New Roman">
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">ezplot(S)</FONT><FONT FACE="Times New Roman">,
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">S</FONT>代表符号变数;另一各相关语法<FONT FACE="Times New Roman">
</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">ezplot(S,[xmin,xmax])</FONT>,则是设定独立变数的范围<FONT COLOR=#FF0000 FACE="Times New Roman">xmin</FONT>到<FONT COLOR=#FF0000 FACE="Times New Roman">xmax</FONT>。<HR>
<A HREF="ch11_1.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch11_1.htm"><IMG SRC="lastpage.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/lastpage.gif" BORDER=0></A>
<A HREF="ch11_1_2.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch11_1_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="javascript:if(confirm('http://166.111.167.223/computer/tppmsgs/msgs0.htm \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://166.111.167.223/computer/tppmsgs/msgs0.htm#69'" tppabs="http://166.111.167.223/computer/tppmsgs/msgs0.htm#69"><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 + -