?? ch4_2_3.htm
字號:
<! Made by Html Translation Ver 1.0>
<html>
<head>
<title> 長條分布函數 </title>
</head>
<body BACKGROUND="../img1/bg0000.gif" tppabs="http://webclass.ncu.edu.tw/~junwu/img/bg0000.gif">
<script language="JAVASCRIPT">
<!--
if (navigator.onLine){
document.write("<!-- Spidersoft WebZIP Ad Banner Insert -->");
document.write("<TABLE width=100% border=0 cellpadding=0 cellspacing=0>");
document.write("<TR>");
document.write("<TD>");
document.write("<ILAYER id=ad1 visibility=hidden height=60></ILAYER>");
document.write("<NOLAYER>");
document.write("<IFRAME SRC='http://www.spidersoft.com/ads/bwz468_60.htm' width=100% height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></IFRAME>");
document.write("</NOLAYER>");
document.write("</TD>");
document.write("</TR>");
document.write("</TABLE>");
document.write("<!-- End of Spidersoft WebZIP Ad Banner Insert-->");
}
//-->
</script>
<!-- Spidersoft WebZIP Ad Banner Insert -->
<!-- End of Spidersoft WebZIP Ad Banner Insert-->
<font COLOR="#0000FF">
<h1>4.2.3 長條分布函數</h1>
</font>
<hr>
<p>有一個繪圖函數與數據分析有關,稱為長條分布函數 (histogram),我們可以用它畫出一組數據的范圍及其
如何分布。它是將數據中的極小到極大值標示在橫軸(即是數據的范圍),再將各個數據出現的次數對
應該數據值(橫軸)來畫在縱軸(即是數據分布的比例)。histogram之所以稱為長條分布函數是它以長條
來表示數據的分布,預設值為10個長條。MATLAB
用來產生長條分布函數指令為 <font COLOR="#FF0000">hist</font>。以下是幾個例子:
</p>
<p><font COLOR="#FF0000">>> x=-3:0.1:3;</font> </p>
<p><font COLOR="#FF0000">>> y=sin(x); % 注意x是徑度</font> </p>
<p><font COLOR="#FF0000">>> hist(y) % 畫出sin(y)的histogram,橫軸代表y的極值[-1,1],縱軸代表y的個數</font>
</p>
<p><font COLOR="#FF0000">>> hist(y,25) % 將預設10個長條改為25個,注意縱軸的值改變,為什么?</font>
</p>
<p><font COLOR="#FF0000">>> hist(y,x) % 將橫軸上下限改為-3到3,注意縱軸的值也改變,為什么?
<br>
</font></p>
<hr>
<a HREF="../../../../tppmsgs/msgs0.htm#77" tppabs="http://webclass.ncu.edu.tw/~junwu/ch4_2_2.htm">
<p><img SRC="../img1/lastpage.gif" tppabs="http://webclass.ncu.edu.tw/~junwu/img/lastpage.gif" BORDER="0" WIDTH="42" HEIGHT="42"></a> <a HREF="ch4_3.htm" tppabs="http://webclass.ncu.edu.tw/~junwu/ch4_3.htm"><img SRC="../img1/nextpage.gif" tppabs="http://webclass.ncu.edu.tw/~junwu/img/nextpage.gif" BORDER="0" HSPACE="10" WIDTH="42" HEIGHT="42"></a> <a HREF="../index.html" tppabs="http://webclass.ncu.edu.tw/~junwu/index.html"><img SRC="../img1/outline.gif" tppabs="http://webclass.ncu.edu.tw/~junwu/img/outline.gif" BORDER="0" HSPACE="6" WIDTH="42" HEIGHT="42"></a><br>
<font SIZE="2" COLOR="#AA55FF">上一頁 下一頁 講義大綱 </font><layer src="http://www.spidersoft.com/ads/bwz468_60.htm" visibility="hidden" id="a1" width="600" onload="moveToAbsolute(ad1.pageX,ad1.pageY); a1.clip.height=60;visibility='show';"></layer> </p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -