毕业论文外文翻译格式.doc_第1页
毕业论文外文翻译格式.doc_第2页
毕业论文外文翻译格式.doc_第3页
毕业论文外文翻译格式.doc_第4页
毕业论文外文翻译格式.doc_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

毕业设计(论文)外文翻译资料学 院: 理学院年级、专业: 2013级、信息与计算科学学 生: 学 号: 3120130902209指导教师: 完成日期: 2017年 5 月 10 日论文定稿装订说明:封面彩打,正文采用单面打印,A4大小装订。 Matlab graphical interface design Make a Matlab GUI graphical user interface design of the general steps: first, the program function description; second, program interface design; third, program code design; fourth, the program test run In the GUI design should pay attention to must advance the budget button number of static layout button on the panel. The more important point is that if the property placed a button and the button of an operation, then the button traces will always remain in the panel, the the button to delete, and then re built a button, and the attribute value is set and a button that doesnt guarantee will be as like as two peas, a button cover, running in the process it will only identify a button in the program (already delete button), remove a button was caused by the program in the operation of the error or is that you dont get the expected In order to avoid this, the setting of any button attribute should not be the same as the properties of the already deleted button when you designCommon attributes of controls: After you create the control, you set the various attribute values for the control, and most control sets the following property values: (1) string property: a string used to display a control, indicating or prompting the action (2) the callback property: the callback function, the same as the menu (3) enable property: indicates whether the control is valid, on means valid, and off means invalid (4) tooltipstring property: when the mouse is placed on the control, display prompt information, as a string (5) font attributes: including fontname, fontsize and so on (6) the Tag property: the tag of the control used to identify the control (7) the value of Units can be pixels (default), normalized (relative unit), inches, centimeters or points (pound); Under the action of the GUI command, the file name to be opened does not distinguish the case of letters. Open the blank version of the GUI interface, and the instructions for each control:Table 1 description of the controlControl namePropertyNameFunctionButtonPushButtonThe most commonly used control, which responds to the users mouse click, has a description of its role on the button.Toggle buttonToggleButtonWhen you click, you will toggle between the bump state.Radio buttonRadioButtonWhen you click to switch with black and white dots, always groups appear, multiple radio buttons are mutually exclusive, only one in a group is selected.Check boxCheckBoxWhen you click, you can switch with , there are selected, unchecked and uncertain statuses, always appear in groups, and multiple check boxes can be selected at the same time.Text boxEditTextConcave box, can freely enter and edit single line and multi-line text, and display.Static text boxStaticTextUsed to display text information, but not accept input.scroll barSliderYou can display the approximate range of values within a range in a graphical manner, and the user can move the scroll bar to change the value.FrameworkFrameEncloses a set of controls in the framework for the decorative interface.list boxListBoxDisplays a drop-down text list that allows users to select one and more items from the list.Pop-up menuPopupMenuThe combination of text boxes and list boxes, which users can select from the drop-down list.AxisAxesUsed to draw axes. The basic mechanism of GUI is attribute to control the program, especially for the callback function (callback) compilation. Notice the concept of callback function, which means that in an event object occurs, the internal mechanism allows MATLAB to call the function automatically. The meanings of several parameters are: HObject represents the handle of the current window;Eventdata represents event code for reservations;Handles is a collection of all handles in this window In the graphical user interface programming, dialog box is an important information display and access to the user interface object input data. The use of the dialog box, can make the application program interface more friendly, more convenient to use.Matlab provides two types of dialog box, one for the Windows public dialog, another special dialog box for Matlab style.1. public dialog box The public dialog is a dialog box that uses Windows resources, including file opening, file save, color settings, font settings, print settings, print preview, print, and so onFile open dialog box: Used to open a file, the function is uigetfile, and its call format is:Uigetfile: pop up the file open dialog box and list all the Matlab files in the current directory; Uigetfile (FilterSpec): pop-up file open dialog box, listing all the files specified by FilterSpec in the current directory; Uigetfile ( FilterSpec , DialogTitle ): setting the file open dialog title is DialogTitle; Uigetfile ( FilterSpec , DialogTitle , x, y):. The X Y parameter is used to determine the location of the file open dialog box;fname, pname=uigetfile. ) returns the file name and path of the open fileFile Save dialog Used to save the file, the function is uiputfile, and its call format is: Uiputfile: the pop-up file save dialog box lists all the Matlab files in the current directory; Uiputfile (InitFile): the pop-up file save dialog box lists all the files specified by the InitFile in the current directory; Uiputfile ( InitFile , DialogTitle ):. At the same time, set the title of the file save dialog as DialogTitle; Uiputfile ( InitFile , DialogTitle , x, y):. The X Y parameter is used to determine the location of the file save dialog box;fname, pname=uiputfile. ) returns the file name and path of the saved fileColor settings dialog box An interactive setting for graphics object colors, called uisetcolor, whose call format is: C = uisetcolor(h_or_c,dialogtitle”) The input parameter h_or_c can be a handle to a graphical object, or a three color RGB vector, and DialogTitle is the title of the color settings dialog boxuisetfont Interactive settings for font properties, function uisetfont, format as: Uisetfont: opens the font settings dialog box to return the properties of the selected font; The uisetfont (H):h is a graphical object handle, and the font properties of the object are reset using the font settings dialog box; Uisetfont (S):S is the font property structure variable, and the attributes contained in S include FontName, FontUnits, FontSize, FontWeight, FontAngle, and return the reset attribute values; Uisetfont (h, DialogTitle):h is a graphical object handle, and the font settings dialog box is used to reset the font attribute of the object, and the title of the DialogTitle settings dialog box; Uisetfont (S, DialogTitle):S structure font attribute variable, attribute S contains FontName, FontUnits, FontSize, FontWeight, FontAngle, re return the property values set by DialogTitle set the title of the dialog; S=uisetfont (. ) returns the font property value and is stored in the structure variable Sprintdlg Interactive settings for printing pages, with two functions: pagesetupdlg and pagedlg calls, in the form of: The dlg=pagesetupdlg (fig):fig is a handle to the graphics window, and is omitted as the current graphical window; Pagedlg: sets the current graphical window; Pagedlg (fig): sets the graphical window with fig as the handlePrint preview dialog box Used to preview the print page, function PrintPreview, format as:PrintPreview: print preview of the current graphical window; PrintPreview (f): print preview for a graphical window with F as a handlePrintDialog Standard dialog box for Windows, function printdlg, format as: Printdlg: open the Windows Print dialog for the current graphical window; Printdlg (fig): open the Windows Print dialog for the graphical window with fig as the handle; Printdlg ( -crossplatform , fig): open the Matlab Print dialog box in crossplatform mode; Printdlg (- setup, fig): in the print setup mode, the print dialog box is forced to open2.Matlab private dialog box In addition to using the public dialog box, Matlab also provides some private dialog boxes, including help, error messages, information tips, warning messages, and so on Error message dialog box Used to prompt error messages, whose function is errordlg, and its call format is: Errordlg: open the default error message dialog box; Errordlg ( errorstring ): open the error message dialog box that displays errorstring information; Errordlg ( errorstring , dlgname ): open the error information dialog box that displays errorstring information. The title of the dialog box is specified by dlgname; Erordlg ( errorstring , dlgname , on ): open the error information dialog box that displays errorstring information, and the title of the dialog box is specified by dlgnameHelp dialog box Used to help prompt information, the function is helpdlg, and its call format is: Helpdlg: open the default help dialog box; Helpdlg ( helpstring ): opens the help dialog box that displays errorstring information; Helpdlg ( helpstring , dlgname): opens the help dialog box that displays errorstring information. The title of the dialog box is specified by dlgname; H=helpdlg (. ) returns the handle to the dialog boxInput Dialog Used to input information, the function is inputdlg, and its call format is: (input dialog box explanation 1) Answer=inputdlg (prompt): open the input dialog box, prompt is the cell array, used to define the number of input data window and display prompt information, answer is used to store the input data array of cells; Answer=inputdlg (prompt, title), and the person is same, title determines the title of the dialog; Answer=inputdlg (prompt, title, lineNo): the lineNo parameter can be scalar, vector or m * 2 order matrix, if the scalar representation for each input window line number is lineNo; if the column vector, each input window number of rows from each element column vector lineNo to determine if the matrix; each element corresponds to an input window, each row of the first column is the number of rows in the input window, second as input window width; Answer=inputdlg (prompt, title, lineNo, defAns): the defans parameter as a unit array, the default value is stored for each input data, the number of elements must be the same as the input window defined by the number of prompt, all elements must be a string; Answer=inputdlg (prompt, title, lineNo, defAns, Resize): the parameter resize determines whether the size of the input dialog can be adjusted, and the optional value is on or off.List selection dialog box Syntax: section, ok=listdlg ( chracname , value ) The parameter list dialog box is composed of a pair of attribute names and attribute values of chracname vaule. The attribute name ListString set option, option for string or string array; attribute name Initial Value set the initial option; the attribute name SelectionMode set is selected, the attribute value Single for radio the attribute value, multiple is selected; the attribute name PromotString set the prompt character. Selection returns the users serial number.Ok for the selected backup number. Whether the user clicks the logical value confirmed by the Ok button, 1 is the confirmation, and 0 is the Cancel button All of the attributes, GUIDE GUI generated M file system GUI interface behavior, appearance and response to the users operation. For example, press a button or select a menu item or.M file contains all the code needed to run the entire interface program, including the ALLBACKS function of all GUI components. In fact, these the callbacks function is the M file in the callback subroutine, fill in inside the desired program to do, than a picturesque map or a formula.Matlab图形界面设计制作一个Matlab GUI图形用户界面设计的一般步骤:第一、程序功能描述;第二、程序界面设计;第三、程序代码设计;第四、程序测试运行。 在GUI的设计中应注意在面板上进行按钮的静态布置时一定要事先预算好按钮的个数。更重要的一点是如果放置了一个按钮并且对此按钮的属性进行了某种操作,那么该按钮的痕迹将永远保存在所建的面板上,将该按钮删除,然后重新建一个按钮,并将其属性值设置和上一个按钮一模一样,那并不能保证将上一按钮覆盖,在程序进行运行的过程中它只会识别上一按钮(已经删除的按钮),将上一按钮的删除则造成程序运行中的错误或是得不到你预想的界面效果,为了避免这种情况,在进行设计的时候对任一按钮属性的设置不要与已经删除按钮的属性相同。 控件的常用属性: 创建控件以后,要对控件的各种属性值进行设置,大部分控件都要对以下的属性值进行设置:(1)string属性:用于显示在控件上的字符串,起说明或提示作用。(2)callback属性:回调函数,与菜单的一样。(3)enable属性:表示该控件是否有效,”on“表示有效,”off“表示无效。(4)tooltipstring属性:当鼠标放在控件上时显示提示信息,为字符串。(5)字体属性:包括fontname,fontsize等。(6)Tag属性:控件的标记,用于标识控件。(7)Units取值可以是pixels (缺省值),normalized(相对单位), inches, centimeters或points(磅);在GUI指令的作用下,待打开的文件名不区分字母的大小写。打开空白版的GUI界面各个控件的说明:表1 控件说明控件名PropertyName功能按钮PushButton最常用的控件,用于响应用户的鼠标单击,按钮上有说明文字说明其作用。切换按钮ToggleButton当单击时会凹凸状态切换。单选按钮RadioButton当单击时会用黑白点切换,总是成组出现,多个单选按钮互斥,一组中只有一个被选中。复选框CheckBox当单击时会用切换,有选中、不选中和不确定等状态,总是成组出现,多个复选框可同时选用。文本框EditText 凹形方框,可随意输入和编辑单行和多行文字,并显示出来。静态文本框StaticText 用于显示文字信息,但不接受输入。滚动条Slider可以用图示的方式显示在一个范围内数值的大概值范围,用户可以移动滚动条改变数值。框架Frame 将一组控件围在框架中,用于装饰界面。列表框ListBox 显示下拉文字列表,用户可以从列表中选择一项和多项。弹出式菜单PopupMenu 相当于文本框和列表框的组合,用户可以从下拉列表中选择。坐标轴Axes 用于绘制坐标轴。 实现GUI的基本机制是对控件的属性编程,特别是对其回调函数(callback)的编写。注意回调函数的概念,它指的是在对象的某一个事件发生时,MATLAB内部机制允许自动调用的函数。 其几个参数的意思分别为: hObject表示当前窗口的句柄; eventdata表示事件代码,为保留; handles是该窗口中的所有句柄的集合。在图形用户界面程序设计中,对话框是重要的信息显示和获取输入数据的用户界面对象。使用对话框,可以使应用程序的界面更加友好,使用更加方便。Matlab 提供了两类对话框,一类为Windows的公共对话框,另一类为Matlab风格的专用对话框。1.公共对话框公共对话框是利用windows资源的对话框,包括文件打开、文件保存、颜色设置、字体设置、打印设置、打印预览、打印等。 文件打开对话框用于打开文件,函数为uigetfile,其调用格式为:u uigetfile:弹出文件打开对话框,列出当前目录下的所有Matlab文件;u uigetfile(FilterSpec):弹出文件打开对话框,列出当前目录下的所有由FilterSpec 指定类型的文件;u uigetfile(FilterSpec,DialogTitle):同时设置文件打开对话框的标题为DialogTitle;u uigetfile(FilterSpec,DialogTitle,x,y):x,y参数用于确定文件打开对话框的位置;u fname,pname=uigetfile():返回打开文件的文件名和路径。 文件保存对话框用于保存文件,函数为uiputfile,其调用格式为:u uiputfile:弹出文件保存对话框,列出当前目录下的所有Matlab文件;u uiputfile(InitFile):弹出文件保存对话框,列出当前目录下的所有由InitFile指定类型的文件;u uiputfile(InitFile,DialogTitle):同时设置文件保存对话框的标题为DialogTitle;u uiputfile(InitFile,DialogTitle,x,y):x,y参数用于确定文件保存对话框的位置;u fname,pname=uiputfile():返回保存文件的文件名和路径。 颜色设置对话框用于图形对象颜色的交互式设置,函数为 uisetcolor,其调用格式为:c=uisetcolor(h_or_c,DialogTitle)输入参数 h_or_c 可以是一个图形对象的句柄,也可以是一个三色 RGB 矢量,DialogTitle为颜色设置对话框的标题。 字体设置对话框用于字体属性的交互式设置,函数为uisetfont,格式为:u uisetfont:打开字体设置对话框,返回所选择字体的属性;u uisetfont(h):h 为图形对象句柄,使用字体设置对话框重新设置该对象的字体属性;u uisetfont(S):S为字体属性结构变量,S中包含的属性有FontName、FontUnits、FontSize、FontWeight、FontAngle,返回重新设置的属性值;u uisetfont(h,DialogTitle):h为图形对象句柄,使用字体设置对话框重新设置该对象的字体属性,DialogTitle设置对话框的标题;u uisetfont(S,DialogTitle): S为字体属性结构变量,S中包含的属性有FontName、FontUnits、FontSize、FontWeight、FontAngle,返回重新设置的属性值, DialogTitle 设置对话框的标题;u S=uisetfont():返回字体属性值,保存在结构变量S中。 打印设置对话框用于打印页面的交互式设置,有两个函数:pagesetupdlg 和 pagedlg调用格式为:u dlg=pagesetupdlg(fig):fig为图形窗口的句柄,省略时为当前图形窗口;u pagedlg:设置当前图形窗口;u pagedlg(fig):设置以fig为句柄的图形窗口。 打印预览对话框用于对打印页面进行预览,函数为printpreview ,格式为:u printpreview:对当前图形窗口进行打印预览;u printpreview(f):对以f为句柄的图形窗口进行打印预览。 打印对话框 为Windows的标准对话框,函数为 printdlg ,格式为:u printdlg:对当前图形窗口打开Windows打印对话框;u printdlg(fig):对以fig为句柄的图形窗口打开Windows打印

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论