1. function varargout = GUI013(varargin)
  2. % GUI013 MATLAB code for GUI013.fig
  3. % GUI013, by itself, creates a new GUI013 or raises the existing
  4. % singleton*.
  5. %
  6. % H = GUI013 returns the handle to a new GUI013 or the handle to
  7. % the existing singleton*.
  8. %
  9. % GUI013('CALLBACK',hObject,eventData,handles,...) calls the local
  10. % function named CALLBACK in GUI013.M with the given input arguments.
  11. %
  12. % GUI013('Property','Value',...) creates a new GUI013 or raises the
  13. % existing singleton*. Starting from the left, property value pairs are
  14. % applied to the GUI before GUI013_OpeningFcn gets called. An
  15. % unrecognized property name or invalid value makes property application
  16. % stop. All inputs are passed to GUI013_OpeningFcn via varargin.
  17. %
  18. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  19. % instance to run (singleton)".
  20. %
  21. % See also: GUIDE, GUIDATA, GUIHANDLES
  22.  
  23. % Edit the above text to modify the response to help GUI013
  24.  
  25. % Last Modified by GUIDE v2. -Jan- ::
  26.  
  27. % Begin initialization code - DO NOT EDIT
  28. gui_Singleton = ;
  29. gui_State = struct('gui_Name', mfilename, ...
  30. 'gui_Singleton', gui_Singleton, ...
  31. 'gui_OpeningFcn', @GUI013_OpeningFcn, ...
  32. 'gui_OutputFcn', @GUI013_OutputFcn, ...
  33. 'gui_LayoutFcn', [] , ...
  34. 'gui_Callback', []);
  35. if nargin && ischar(varargin{})
  36. gui_State.gui_Callback = str2func(varargin{});
  37. end
  38.  
  39. if nargout
  40. [varargout{:nargout}] = gui_mainfcn(gui_State, varargin{:});
  41. else
  42. gui_mainfcn(gui_State, varargin{:});
  43. end
  44. % End initialization code - DO NOT EDIT
  45.  
  46. % --- Executes just before GUI013 is made visible.
  47. function GUI013_OpeningFcn(hObject, eventdata, handles, varargin)
  48. % This function has no output args, see OutputFcn.
  49. % hObject handle to figure
  50. % eventdata reserved - to be defined in a future version of MATLAB
  51. % handles structure with handles and user data (see GUIDATA)
  52. % varargin command line arguments to GUI013 (see VARARGIN)
  53.  
  54. % Choose default command line output for GUI013
  55. handles.output = hObject;
  56.  
  57. handles.x = -pi:0.01:pi;
  58.  
  59. % Update handles structure
  60. guidata(hObject, handles);
  61.  
  62. % UIWAIT makes GUI013 wait for user response (see UIRESUME)
  63. % uiwait(handles.figure1);
  64.  
  65. % --- Outputs from this function are returned to the command line.
  66. function varargout = GUI013_OutputFcn(hObject, eventdata, handles)
  67. % varargout cell array for returning output args (see VARARGOUT);
  68. % hObject handle to figure
  69. % eventdata reserved - to be defined in a future version of MATLAB
  70. % handles structure with handles and user data (see GUIDATA)
  71.  
  72. % Get default command line output from handles structure
  73. varargout{} = handles.output;
  74.  
  75. % --- Executes on button press in sin.
  76. function sin_Callback(hObject, eventdata, handles)
  77. % hObject handle to sin (see GCBO)
  78. % eventdata reserved - to be defined in a future version of MATLAB
  79. % handles structure with handles and user data (see GUIDATA)
  80. x = handles.x;
  81. y = sin(x);
  82. plot(handles.plotarea,x,y,'b')
  83.  
  84. % --- Executes on button press in cos.
  85. function cos_Callback(hObject, eventdata, handles)
  86. % hObject handle to cos (see GCBO)
  87. % eventdata reserved - to be defined in a future version of MATLAB
  88. % handles structure with handles and user data (see GUIDATA)
  89.  
  90. x = handles.x;
  91. y = cos(x);
  92. plot(handles.plotarea,x,y,'g')
  93.  
  94. % --- Executes on button press in tan.
  95. function tan_Callback(hObject, eventdata, handles)
  96. % hObject handle to tan (see GCBO)
  97. % eventdata reserved - to be defined in a future version of MATLAB
  98. % handles structure with handles and user data (see GUIDATA)
  99.  
  100. x = handles.x;
  101. y =/*tan(x);
  102. plot(handles.plotarea,x,y,'r')
  103.  
  104. % --- Executes on button press in clear.
  105. function clear_Callback(hObject, eventdata, handles)
  106. % hObject handle to clear (see GCBO)
  107. % eventdata reserved - to be defined in a future version of MATLAB
  108. % handles structure with handles and user data (see GUIDATA)
  109. try
  110. delete(allchild(handles.plotarea));
  111. end

GUI编程实例的更多相关文章

  1. Python GUI编程实例

    import os from time import sleep from tkinter import * from tkinter.messagebox import showinfo class ...

  2. 3.JAVA之GUI编程Frame窗口

    创建图形化界面思路: 1.创建frame窗体: 2.对窗体进行基本设置: 比如大小.位置.布局 3.定义组件: 4.将组件通过add方法添加到窗体中: 5.让窗体显示,通过setVisible(tur ...

  3. 5.JAVA之GUI编程窗体事件

    我们回顾下第三篇时的内容: 在3.JAVA之GUI编程Frame窗口中窗体是无法直接关闭的,想要关闭须进程管理器结束进程方式关掉. 现在我们就来解决下这个问题. ******************* ...

  4. 初次踏上GUI编程之路(有点意思,详细介绍了菜鸟的学习之路)

    初次踏上GUI编程之路 —— 我的Qt学习方法及对Qt认识的不断转变 -> 开始接触GUI与开始接触Qt: 话说,我第一次看见“Qt”这一个名词,好像是在CSDN网站的主页上吧,因为CSDN好像 ...

  5. Python进阶--GUI编程

    一.图形用户图面(GUI编程) 1. wxpython下载和安装: 下载url: http://wxpython.org/download.php 2.创建示例GUI应用程序 : ①开始需要导入wx ...

  6. Java之GUI编程(一)

    GUI全称Graphical User Interfaces,意为图形用户户界面,又称为图形用户接口.GUI指的就是採用图形方式显示的计算机操作用户界面,打个例如吧.我们点击QQ图标,就会弹出一个QQ ...

  7. java Gui编程 事件监听机制

    1.     GUI编程引言 以前的学习当中,我们都使用的是命令交互方式: 例如:在DOS命令行中通过javac java命令启动程序. 软件的交互的方式:   1. 命令交互方式    图书管理系统 ...

  8. Java GUI编程中AWT/swing/SWT的优缺点

    http://www.cnblogs.com/dugang/archive/2010/10/22/1858478.html AWT AWT是Abstract Window Toolkit(抽象窗口工具 ...

  9. Shell编程实例

    一.简介 从程序员的角度来看, Shell本身是一种用C语言编写的程序,从用户的角度来看,Shell是用户与Linux操作系统沟通的桥梁.用户既可以输入命令执行,又可以利用 Shell脚本编程,完成更 ...

随机推荐

  1. redis缓存和mysql数据库同步

    附redis关于缓存雪崩和缓存穿透,热点key 穿透 穿透:频繁查询一个不存在的数据,由于缓存不命中,每次都要查询持久层.从而失去缓存的意义. 解决办法: 持久层查询不到就缓存空结果,查询时先判断缓存 ...

  2. C++中的内存区域及其性能特征

    首先须要指出的是.我们通经常使用"堆"和"自由存储"这两个术语来区分两种不同类型的动态分配内存. 1.常量数据:常量数据区域主要用于存储字符串以及其它在编译期就 ...

  3. centos下搭建sockets5代理

    #安装依赖及ss5 yum -y install gcc openldap-devel pam-devel openssl-devel wget https://nchc.dl.sourceforge ...

  4. centos6.8上yum安装zabbix3.2

    centos6.8上yum安装zabbix3.2 zabbix3.2安装文档:https://www.zabbix.com/documentation/3.2/manual/installation/ ...

  5. GlusterFS 配置及使用

    GlusterFS集群创建 一.简介 GlusterFS概述 Glusterfs是一个开源的分布式文件系统,是Scale存储的核心,能够处理千数量级的客户端.在传统的解决 方案中Glusterfs能够 ...

  6. openshift 调度命令

    oc adm manage-node oc-node07 --schedulable=true  #可调度 oc adm manage-node oc-node07 --schedulable=fal ...

  7. [LeetCode] 581. Shortest Unsorted Continuous Subarray_Easy tag: Sort, Stack

    Given an integer array, you need to find one continuous subarray that if you only sort this subarray ...

  8. android获取通讯记录,sim卡和手机

    //获取手机和手机卡通讯录 public static String getContacts() { String szContacts = ""; szContacts=getP ...

  9. a标签下载;页面传参row对象先转换成字符串。

    jsp:添加一列 <th data-options="field:'id',width:180,formatter: rowformater" width="20% ...

  10. Hibernate.编写xml文件无自动提示信息

    Hibernate.编写xml文件无自动提示信息 注意: 配置 xxxx.hbm.xml 文件的自动提示.和配置 hibernate.cfg.xml 文件的提示,操作步骤是一样的.只是复制的文件内容. ...