📄 ch9_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>9.1.1 梯形法</H1>
</FONT>
<HR>
<P>
<FONT FACE="Times New Roman">MATLAB</FONT>提供最简单的积分函数是梯形法<FONT COLOR=#FF0000 FACE="Times New Roman">trapz</FONT>,我们先说明梯形法语法<FONT COLOR=#FF0000 FACE="Times New Roman">trapz(x,y)</FONT>,其中<TT><FONT FACE="Courier New">x,y</FONT></TT>分别代表数目相同
的阵列或矩阵,而<FONT COLOR=#FF0000 FACE="Times New Roman">y</FONT>与<FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>的关系可以由是一函数型态(如<I><FONT FACE="Times New Roman">y</FONT></I><FONT FACE="Times New Roman">=sin(<I>x</I>)</FONT>)或是不以函数描述的离散型态(像第八章介
绍的<FONT COLOR=#FF0000 FACE="Times New Roman">x</FONT>与<FONT COLOR=#FF0000 FACE="Times New Roman">y</FONT>皆为离散点)。
<BR>
<P>
我们看一简单积分式
<P>
<IMG SRC="img00002-6.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img9/img00002.gif">
<P>
以下为<FONT FACE="Times New Roman"> MATLAB </FONT>的程式
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> x=0:pi/100:pi;</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> y=sin(x);</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> k=trapz(x,y)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">k =</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 1.9998<BR>
</FONT><HR>
<A HREF="ch9_1.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch9_1.htm"><IMG SRC="lastpage.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/lastpage.gif" BORDER=0></A>
<A HREF="ch9_1_2.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch9_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="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 + -