?? ch3_1_6.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>3.1.6 其它的功能</h1>
</font>
<hr>
<p>如果我們須要在所畫的圖中的曲線的某處加上符號,而又可以隨意的放置這些符號,則可以用指令<font COLOR="#FF0000">ginput</font>方式
,它容許我們以滑鼠或上下左右游標在螢?zāi)簧陷斎胍由戏柕淖鶚恕O旅娴睦邮且粋€有8個峰頂及峰谷的
函數(shù)分布圖( <i>y = sin (x) / x</i> ),我們以滑鼠方式將符號加在這些峰值上,藉以突顯這些極值,其語法為
<font COLOR="#FF0000">[x,y]=ginput(n)</font>。 </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> x=linspace(-2*pi,2*pi,60);</font>
</p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> y=sin(x).^2./(x+eps); % </font><font COLOR="#FF0000">注意加上</font><font COLOR="#FF0000" FACE="Times New Roman">eps</font><font COLOR="#FF0000">可避免當(dāng)</font><font COLOR="#FF0000" FACE="Times New Roman">x</font><font COLOR="#FF0000">趨近零時,</font><font COLOR="#FF0000" FACE="Times New Roman">y</font><font COLOR="#FF0000">會無法定義</font> </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> plot(x,y)</font> </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> [a,b]=ginput(8); % </font><font COLOR="#FF0000">依序從螢?zāi)惠斎?lt;/font><font COLOR="#FF0000" FACE="Times New Roman">8</font><font COLOR="#FF0000">點的座標</font> </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> hold on</font> </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> plot(a,b,'co') % </font><font COLOR="#FF0000">依據(jù)輸入的座標值將符號畫在圖上適當(dāng)位置</font> </p>
<p><font COLOR="#FF0000" FACE="Times New Roman">>> hold off<br>
<br>
</font></p>
<hr>
<a HREF="ch3_1_5.htm" tppabs="http://webclass.ncu.edu.tw/~junwu/ch3_1_5.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="ch3_2.htm" tppabs="http://webclass.ncu.edu.tw/~junwu/ch3_2.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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -