matlab GUI 编程
matlab 语法的简便,在 GUI 上也不遑多让呀;
uigetfile
[filename, pathname] = uigetfile('*.m', 'choose a m file')
1. 创建对话框程序
button = questdlg('qstring','title','str1','str2',default)
% 第一个参数:显示的字符串
% 第二个参数:表示对话框的标题
% 后续可变参数表示,不同的按钮
% 最后一个字符串为默认选定的按钮,(需在前面已经出现)
% 返回值为选中的按钮对应的文本类型
button = questdlg('qstring','title','str1','str2','str1')
2. 交互式获取矩形区域的坐标
>> rect = getrect
% in current axes
>> rect = getrect(fig)
% in the current axes of
figure fig
>> rect = getrect(ax)
% in the axes specified by
the handle ax.
Use the mouse to click and drag the desired rectangle(用鼠标拖拽获得期望的矩形区域). rect is a four-element vector with the form [xmin ymin width height](返回值是四个元素构成的一个vector). To constrain the rectangle to be a square, use a shift- or right-click to begin the drag.(想要限制这个矩形为一个正方形,使用shift或者单击右键开始拖拽)
3. 输入框
prompt = {'Enter image name:', 'Enter colormap name:'};
title = 'Image display - assignin example';
lines = 1;
def = {'my_image', 'hsv'};
answer = inputdlg(prompt, title, lines, def);
% answer 接收输入框文本的值;
assignin('base', 'imfile', answer{1});
assignin('base', 'cmap', answer{2});
% 在 base workspace 下创建两个变量,imfile,cmap,并赋字符串值
matlab GUI 编程的更多相关文章
- MATLAB串口操作和GUI编程
程序说明 V1.0 2015/2/08 MATLAB串口操作和GUI编程 概述 本文介绍了程序AD9512_Serial_GUI的编程思路和功能.该程序设计到MATLAB的图像用户界面编程的基 ...
- [学习一个] Matlab GUI 学习笔记 Ⅰ
Matlab GUI 学习笔记 Ⅰ 1. Foreword Matlab 是严格意义上的编程语言吗?曾经有人告诉我他是通过 Matlab 学会了面对对象编程,我是不信的,但这依然不妨碍它在特殊领域的强 ...
- Matlab GUI读入图片
% --- Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, han ...
- Matlab GUI程序设计入门——信号发生器+时域分析
背景:学习matlab gui编程入门,完成一个基于GUIDE的图形化界面程序,结合信号生成及分析等. 操作步骤: 1.新建程序 新建一个GUIDE程序 这里选择第一个选项,即创建一个空白的GUIDE ...
- matlab GUI界面编程总结
去年做了一些关于Matlab GUI的程序,现在又要做相关的东西,回想起来,当时很多经验没有记录下来,现在回顾起来始终觉得不爽,所以从现在开始,一定要勤写记录. 从简单的例子说起吧. 创建Matlab ...
- java matlab 混合编程 Failed to find the required library mclmcrrt9_2.dll on java.library.path.
问题描述: Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the requir ...
- matlab GUI工作原理
例如,用GUIDE创建名为ceshi的GUI程序,其m文件的主函数有如下形式.那么,打开该GUI时,它到底是怎么运行的呢?以下略作小结,欢迎大家补充 function varargout = cesh ...
- Matlab——GUI初涉
Matlab——GUI初涉 MATLAB GUI教学视频0:GUI中的基本操作—在线播放—优酷网,视频高清在线观看http://v.youku.com/v_show/id_XMjM2Mjk0MjM2. ...
- [转载] 关于matlab GUI的一点心得
转载自 落落轻尘 [Fig文件方式,即使用菜单File->New->GUI来设计界面] 首先值得注意的是,在低版本matlab上制作的含GUI的m文件一般不能在高版本的matlab上面运行 ...
随机推荐
- [MobX] MobX fundamentals: deriving computed values and managing side effects with reactions
Derivations form the backbone of MobX and come in two flavors: computed values are values that can b ...
- hadoop集群中的日志文件 分类: A1_HADOOP 2015-02-28 20:37 680人阅读 评论(0) 收藏
hadoop存在多种日志文件,其中master上的日志文件记录全面信息,包括slave上的jobtracker与datanode也会将错误信息写到master中.而slave中的日志主要记录完成的ta ...
- Size Balanced Tree(SBT树)整理
不想用treap和Splay,那就用SB树把,哈哈,其实它一点也SB,厉害着呢. 先膜拜一下作者陈启峰.Orz 以下内容由我搜集整理得来. 一.BST及其局限性 二叉查找树(Binary Search ...
- php中usort自定义排序如何使用
php中usort自定义排序如何使用 一.总结 一句话总结:多写一个规则函数,而这个函数的写法和普通函数一样,调用的时候规则函数用函数名的字符串. 1.用户自定义规则函数有哪三个? usort — 使 ...
- Oracle列加密
加密函数 create or replace function encrypt_des(p_text varchar2, p_key varchar2) return varchar2 isv_tex ...
- EChats+Ajax之柱状图的数据交互
原文链接:https://blog.csdn.net/qq_37936542/article/details/79723710 一:下载 echarts.min.js 选择完整版进行下载,精简版和常用 ...
- USB 3.0规范中译本 第10章 集线器,主机下行口以及设备上行口规范
本文为CoryXie原创译文,转载及有任何问题请联系cory.xie#gmail.com. 本章描述USB 3.0 集线器的体系结构要求.本章还描述主机下行口和集线器下行口之间功能性的不同之处,以及设 ...
- URIEncoding
http://thoughtfly.iteye.com/blog/1533481 http://docs.spring.io/spring/docs/current/spring-framework- ...
- [Django] The models
Create a new app: python manage.py startapp tictactoe Then add you app to INSTALLED_APP array in set ...
- Local database deployment problems and fixtures
/*By Jiangong SUN*/ After encountering some problems in deploying databases to local server, here ar ...