matlab gui的callback,matlab GUI callback 函数实现
搞了一下午,看了些资料,终于弄好了matlab GUI中的回调函数。
效果图见底部~
umtitled3.m:
function varargout = untitled3(varargin)
% UNTITLED3 M-file for untitled3.fig
% UNTITLED3, by itself, creates a new UNTITLED3 or raises the existing
% singleton*.
%
% H = UNTITLED3 returns the handle to a new UNTITLED3 or the handle to
% the existing singleton*.
%
% UNTITLED3('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLED3.M with the given input arguments.
%
% UNTITLED3('Property','Value',...) creates a new UNTITLED3 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled3_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled3_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
% Copyright 2002-2003 The MathWorks, Inc.
% Edit the above text to modify the response to help untitled3
% Last Modified by GUIDE v2.5 18-Mar-2012 16:58:53
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled3_OpeningFcn, ...
'gui_OutputFcn', @untitled3_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before untitled3 is made visible.
function untitled3_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 untitled3 (see VARARGIN)
% Choose default command line output for untitled3
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitled3 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = untitled3_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{1} = handles.output;
% --- Executes on button press in openfile.
function openfile_Callback(hObject, eventdata, handles)%打开文件
global filep
filep=OnFileOpen();
% hObject handle to openfile (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)%求取sift特征
global filep
global im1
global des1
global loc1
[im1,des1,loc1] = sift(filep);
showkeys(im1,loc1);
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)%写入txt文件
global im1
global des1
global loc1
fid=fopen('matrix.txt','w');
fprintf(fid,'%f',des1);%sift特征
fclose(fid);
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
图片贴上:
design view:
result view:
property inspector:
matlab gui的callback,matlab GUI callback 函数实现相关推荐
- matlab函数画图创建gui,如何在MATLAB中的函数内创建GUI?
build a GUI有多种方法,例如使用App Designer,GUIDE或以编程方式创建它(我将在下面说明此选项).了解GUI组件和 options available for sharing ...
- 使用MATLAB GUI创建图形用户界面GUI
MATLAB是众多理工科学生及工程师经常使用的一款数学软件,除了可以实现数据处理,矩阵运算.函数绘制等功能外,MATLAB还可以实现图形用户界面的设计. 下面介绍如何让小白也能用GUI创建最基本的用户 ...
- 【光学】 基于matlab模拟光的双缝干涉附GUI
1 简介 物理光学研究的主要现象为光的干涉.光的衍射和光的偏振.其中杨氏双缝干涉理论在光的干涉教学中占有很重要的地位.由于物理光学从光的微观上来 理解光的本质,因此比较抽象.如果不借助于实验现象,学生 ...
- matlab 二值化_基于MATLAB的指纹识别系统[GUI界面+万字技术文档+语音播报]
一.课题介绍 本设计为基于MATLAB的指纹识别系统.本设计系统主要对指纹图像进行三方面处理:图像预处理.特征提取和特征匹配.图像预处理包括四个步骤:图像灰度化.滤波增强.二值化.细化,对指纹图像进行 ...
- matlAB gui 变成c,matlab改变GUI和figure左上角图标的方法,并生成exe文件
1. GUI左上角图标的更改,假设GUI的Tag为figure1,在其OpeningFcn里添加 h = handles.figure1; %返回其句柄 newIcon = javax.swing.I ...
- 用matlab做音乐仿真,Matlab课程设计报告--MATLAB GUI的音乐键盘仿真
Matlab课程设计报告--MATLAB GUI的音乐键盘仿真 1 MATLAB MATLAB 实践实践 课程设计课程设计 目目 录录 1.1.设计目的设计目的3 3 2.2.题目分析题目分析3 3 ...
- matlab音乐键盘模拟,Matlab课程设计报告--MATLAB GUI的音乐键盘仿真
Matlab课程设计报告--MATLAB GUI的音乐键盘仿真 < MATLAB 实践 > 课程设计 目 录 1.设计目的-------------------3 2.题目分析------ ...
- MATLAB数字图像去噪处理系统[GUI]
MATLAB数字图像去噪处理系统[GUI] 1.摘 要 现代图像.语声.数据通信对线性相位的要求是普遍的.正是此原因,使得具有线性相位的FIR数字滤波器得到大力发展和广泛应用. 在实际进行数字信号处理 ...
- 基于MATLAB的数字图像处理系统GUI界面设计
基于MATLAB的数字图像处理系统GUI界面设计 图像读入 从图形文件中读入图像 imread Syntax: A = imread(filename, fmt) filename:指定的灰度或彩色图 ...
- 基于Matlab人脸识别签到系统(GUI界面)
文件大小:5.3M 代码行数:298行(主程序) 开发环境:Matlab2016.2017.2018.2020.2021 点击下载:点击下载 简要概述:基于Matlab人脸识别签到系统(GUI界面) ...
最新文章
- 在熊市中厚积薄发 比特币现金加大基础设施、应用程序和协议创新力度
- base64 数据处理
- IP地址概念及其划分
- spring boot 整合mongoDb
- Java经典实例:比较浮点数
- 1. 观察者模式总结(C++)
- HTML5 文件域+FileReader 分段读取文件(四)
- [vue] 怎么在watch监听开始之后立即被调用?
- Acrobat如何修改PDF/A模式下的PDF文档
- 快速简单高效的搭建 SolrCloud 集群
- SAP License:在产品结算参数设置
- Facebook: 亿级向量相似度检索库Faiss 原理+应用
- SQL NOTE-VARIABLE
- python运行报错无法映射_2018-03-01跳一跳python实践
- Docker安装稳定版及指定版本
- poj 2029 Get Many Persimmon Trees 二维树状数组
- SQL函数大全(转)
- python语言规范_python语言规范
- 墨刀导出的html可以修改,怎么把墨刀的原型复制出来
- 什么是计算机科学中的“本体论”
热门文章
- 网友在各自领域中所用到的芯片总结(转载)
- 【语音处理】音频信号分析仪Matlab系统
- 《加速器理论(第二版)》读书笔记
- sd卡插入计算机要格式化,内存卡一直提示格式化,内存卡插电脑要格式化-
- 信息计算机课评课,关于信息技术的评课稿
- 坯子库怎么导入插件_【亲测能用】草图大师Sketchup坯子库插件管理器SU2014-2019插件64位下载-羽兔网...
- Ubuntu20.04使用1080Ti配置深度学习工作环境出现桌面滚动时卡顿问题解决
- 计算机智能的技术的应用,计算机人工智能技术的应用与发展(1)
- 震网三代在metasploit-framework上的复现与利用
- linux ad7705驱动程序,tm7705_51单机片驱动