GUI编程实例
function varargout = GUI013(varargin)
% GUI013 MATLAB code for GUI013.fig
% GUI013, by itself, creates a new GUI013 or raises the existing
% singleton*.
%
% H = GUI013 returns the handle to a new GUI013 or the handle to
% the existing singleton*.
%
% GUI013('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI013.M with the given input arguments.
%
% GUI013('Property','Value',...) creates a new GUI013 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before GUI013_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to GUI013_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help GUI013 % Last Modified by GUIDE v2. -Jan- :: % Begin initialization code - DO NOT EDIT
gui_Singleton = ;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @GUI013_OpeningFcn, ...
'gui_OutputFcn', @GUI013_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{})
gui_State.gui_Callback = str2func(varargin{});
end if nargout
[varargout{:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT % --- Executes just before GUI013 is made visible.
function GUI013_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to GUI013 (see VARARGIN) % Choose default command line output for GUI013
handles.output = hObject; handles.x = -pi:0.01:pi; % Update handles structure
guidata(hObject, handles); % UIWAIT makes GUI013 wait for user response (see UIRESUME)
% uiwait(handles.figure1); % --- Outputs from this function are returned to the command line.
function varargout = GUI013_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure
varargout{} = handles.output; % --- Executes on button press in sin.
function sin_Callback(hObject, eventdata, handles)
% hObject handle to sin (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x = handles.x;
y = sin(x);
plot(handles.plotarea,x,y,'b') % --- Executes on button press in cos.
function cos_Callback(hObject, eventdata, handles)
% hObject handle to cos (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) x = handles.x;
y = cos(x);
plot(handles.plotarea,x,y,'g') % --- Executes on button press in tan.
function tan_Callback(hObject, eventdata, handles)
% hObject handle to tan (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) x = handles.x;
y =/*tan(x);
plot(handles.plotarea,x,y,'r') % --- Executes on button press in clear.
function clear_Callback(hObject, eventdata, handles)
% hObject handle to clear (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
delete(allchild(handles.plotarea));
end
GUI编程实例的更多相关文章
- Python GUI编程实例
import os from time import sleep from tkinter import * from tkinter.messagebox import showinfo class ...
- 3.JAVA之GUI编程Frame窗口
创建图形化界面思路: 1.创建frame窗体: 2.对窗体进行基本设置: 比如大小.位置.布局 3.定义组件: 4.将组件通过add方法添加到窗体中: 5.让窗体显示,通过setVisible(tur ...
- 5.JAVA之GUI编程窗体事件
我们回顾下第三篇时的内容: 在3.JAVA之GUI编程Frame窗口中窗体是无法直接关闭的,想要关闭须进程管理器结束进程方式关掉. 现在我们就来解决下这个问题. ******************* ...
- 初次踏上GUI编程之路(有点意思,详细介绍了菜鸟的学习之路)
初次踏上GUI编程之路 —— 我的Qt学习方法及对Qt认识的不断转变 -> 开始接触GUI与开始接触Qt: 话说,我第一次看见“Qt”这一个名词,好像是在CSDN网站的主页上吧,因为CSDN好像 ...
- Python进阶--GUI编程
一.图形用户图面(GUI编程) 1. wxpython下载和安装: 下载url: http://wxpython.org/download.php 2.创建示例GUI应用程序 : ①开始需要导入wx ...
- Java之GUI编程(一)
GUI全称Graphical User Interfaces,意为图形用户户界面,又称为图形用户接口.GUI指的就是採用图形方式显示的计算机操作用户界面,打个例如吧.我们点击QQ图标,就会弹出一个QQ ...
- java Gui编程 事件监听机制
1. GUI编程引言 以前的学习当中,我们都使用的是命令交互方式: 例如:在DOS命令行中通过javac java命令启动程序. 软件的交互的方式: 1. 命令交互方式 图书管理系统 ...
- Java GUI编程中AWT/swing/SWT的优缺点
http://www.cnblogs.com/dugang/archive/2010/10/22/1858478.html AWT AWT是Abstract Window Toolkit(抽象窗口工具 ...
- Shell编程实例
一.简介 从程序员的角度来看, Shell本身是一种用C语言编写的程序,从用户的角度来看,Shell是用户与Linux操作系统沟通的桥梁.用户既可以输入命令执行,又可以利用 Shell脚本编程,完成更 ...
随机推荐
- 前端 HTML body标签相关内容
想要在网页上展示出来的内容一定要放在body标签中. 常用标签: 标题标签 h1-h6 段落标签 p标签 超链接标签 a标签 列表标签 ul,ol,li 定义列表<dl> 子标签 div ...
- 笔记:mysql升序排列asc,降序排列desc
经常会忘记mysql中升序和降序用什么字符来表示,现在就做个笔记:升序排列asc,降序排列desc,举个例子,下面是按时间降序调用栏目的文章,也即是栏目最新文章 [e:loop={"sele ...
- MySQL大表DROP删除小技巧(转)
在日常工作中,经常会遇到历史大表从主库上迁移到备份机,以便腾出主库空间,那么如果你直接drop table 后,可能会引起数据库抖动,连接数升高等问题,从而影响业务. 那么用一个小技巧,即可轻松平滑的 ...
- Python几种数据结构内置方法的时间复杂度
参考:https://blog.csdn.net/baoli1008/article/details/48059623 注:下文中,’n’代表容器中元素的数量,’k’代表参数的值,或者参数的数量. 1 ...
- Py中axis理解【转载】
转载:https://blog.csdn.net/yaoqi_isee/article/details/77714570 1.理解 numpy当中axis的值表示的是这个多维数组维度的下标,比如有一个 ...
- Centos7系统防火墙上开端口
//permanent 永久生效 没有此参数重启失效 firewall -cmd --zone=public --add -port=80/tcp --permanent //开 ...
- JDB调试
- css3--单行、多行文本溢出
<style> .div1 { width: 200px; height: 200px; background: red url(img/user.png) no-repeat; text ...
- import Tkinter error, no module named tkinter: "Python may not be configured for Tk”
install required devel module in your linux: yum install tk-devel yum install tcl-devel then,reconfi ...
- Jmeter安装与配置
Jmeter下载与安装配置 1.下载地址:https://jmeter.apache.org/ Apache Jmeter首页,点击 Download Releases 然后,选择,安装版本,有li ...