?? 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 + -