⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch3_1_5.htm

📁 MATLAB 程式设计与应用,有很多用途的示例,及对接口都有详细的说明
💻 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.5 列印功能</h1></font><hr><p>MATLAB 的指令<font COLOR="#FF0000">print</font>有二个功能,它可以直接将所画的图列印,也可以将所画的图以指定的图档格式储存起 来。前者是随画随印;而后者是先将图画好再储存起来,事后可将图形档案依指定的方式再列印或是与其它 档案整合。如果是前者,则可直接用绘图视窗中的列印选单。以下的指令则是针对后者的方式,其的基本语 法为<font COLOR="#FF0000">print[filename][-device][-options]</font>,其中的 <font COLOR="#FF0000">[ ]</font>代表附加的选项。如果指令是<font COLOR="#FF0000">print</font>,则表示列印现在绘图视窗 的图。如果是<font COLOR="#FF0000"> print filename</font>,则表示将现在绘图视窗的图存成<font COLOR="#FF0000">filename</font>其附档名依预设的印表机种类有不同的 图档格式。印表机种类的设定即是由<font COLOR="#FF0000">-device</font>决定,以下分项来说明。<br></p><p>MATLAB 直接支援的印表机种类如下 </p><table BORDER="1">  <tr>    <td WIDTH="74">device</td>    <td WIDTH="572">说明</td>  </tr>  <tr>    <td WIDTH="74"><font COLOR="#FF0000" FACE="Times New Roman">-dps</font> </td>    <td WIDTH="572">黑白的描页式 <font FACE="Times New Roman">(PostScript) </font>印表机,附档名为     <font FACE="Times New Roman">.ps</font> </td>  </tr>  <tr>    <td WIDTH="74"><font COLOR="#FF0000" FACE="Times New Roman">-dps2</font> </td>    <td WIDTH="572">黑白的第二代描页式 <font FACE="Times New Roman">(PostScript II) </font>印表机,附档名为     <font FACE="Times New Roman">.ps</font> </td>  </tr>  <tr>    <td WIDTH="74"><font COLOR="#FF0000" FACE="Times New Roman">-deps</font> </td>    <td WIDTH="572">黑白的描页式 <font FACE="Times New Roman">(Encapsulated PostScript) </font>印表机,附档名为     <font FACE="Times New Roman">.eps</font> </td>  </tr>  <tr>    <td WIDTH="74"><font COLOR="#FF0000" FACE="Times New Roman">-deps2</font> </td>    <td WIDTH="572">黑白的第二代描页式 <font FACE="Times New Roman">(Encapsulated     PostScript II) </font>印表机,附档名为 <font FACE="Times New Roman">.eps</font> </td>  </tr></table><p>其实 MATLAB 还支援有彩色的描页式印表机,但这类的印表机太昂贵,一般人是不太可能会使用,所以不做 介绍,可参考使用手册或是线上说明的介绍。 <br></p><p>其它透过 Ghostscript 印表机模拟软体所支援的印表机,可以将描页式的图形档转成下列各个印表机的格式。不 过这项功能只有UNIX及PC的完整版本才有,PC 学生版的MATLAB并没有这个功能。不过这个Ghostscript软体 可以从许多国内的FTP下载,例如 </p><p>中央大学<font FACE="Times New Roman">FTP</font>站<br>Win31版 ftp://ftp.ncu.edu.tw/PC/win3/print/gs403*.zip (共有5个zip档)<br>Win95版 ftp://ftp.ncu.edu.tw/PC/win95/simtelnet/print/gs403*.zip (共有5个zip档)<br></p><table BORDER="1">  <tr>    <td WIDTH="122">device</td>    <td WIDTH="524">说明</td>  </tr>  <tr>    <td WIDTH="122"><font COLOR="#FF0000" FACE="Times New Roman">-dcdjcolor</font> </td>    <td WIDTH="524">24 bits 全彩的 HP DeskJet 500C</td>  </tr>  <tr>    <td WIDTH="122"><font COLOR="#FF0000" FACE="Times New Roman">-depson</font> </td>    <td WIDTH="524">Epson 点矩阵式印表机</td>  </tr>  <tr>    <td WIDTH="122"><font COLOR="#FF0000" FACE="Times New Roman">-dgif8</font> </td>    <td WIDTH="524">8 bits 彩色 GIF 图档,附档名为 .gif</td>  </tr>  <tr>    <td WIDTH="122"><font COLOR="#FF0000" FACE="Times New Roman">-dpcx256</font> </td>    <td WIDTH="524">256 色的彩色 PCX 图档,附档名为 .pcx</td>  </tr></table><p>以下例子是将图存成三种图形格式: </p><p><font COLOR="#FF0000" FACE="Times New Roman">&gt;&gt; print fig1 -dps % </font><font COLOR="#FF0000">将图存成</font><font COLOR="#FF0000" FACE="Times New Roman">PostScript</font><font COLOR="#FF0000">格式,图档为</font><font COLOR="#FF0000" FACE="Times New Roman">fig1.ps</font> </p><p><font COLOR="#FF0000" FACE="Times New Roman">&gt;&gt; print fig1 -dgif8 % </font><font COLOR="#FF0000">将图存成</font><font COLOR="#FF0000" FACE="Times New Roman">GIF</font><font COLOR="#FF0000">格式,图档为</font><font COLOR="#FF0000" FACE="Times New Roman">fig1.gif</font> </p><p><font COLOR="#FF0000" FACE="Times New Roman">&gt;&gt; print fig1 -pcx256 % </font><font COLOR="#FF0000">将图存成</font><font COLOR="#FF0000" FACE="Times New Roman">256</font><font COLOR="#FF0000">色</font><font COLOR="#FF0000" FACE="Times New Roman">PCX</font><font COLOR="#FF0000">格式,图档为</font><font COLOR="#FF0000" FACE="Times New Roman">fig1.pcx <br></font></p><p>而 <font COLOR="#FF0000" FACE="Times New Roman">[-option]</font><font FACE="Times New Roman"> </font>的选项多半可以用绘图视窗的列印功能来替代,所以不在此多做说明。 <br></p><hr><a HREF="ch3_1_4.htm" tppabs="http://webclass.ncu.edu.tw/~junwu/ch3_1_4.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_1_6.htm" tppabs="http://webclass.ncu.edu.tw/~junwu/ch3_1_6.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 + -