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 编程的更多相关文章

  1. MATLAB串口操作和GUI编程

    程序说明 V1.0 2015/2/08 MATLAB串口操作和GUI编程   概述   本文介绍了程序AD9512_Serial_GUI的编程思路和功能.该程序设计到MATLAB的图像用户界面编程的基 ...

  2. [学习一个] Matlab GUI 学习笔记 Ⅰ

    Matlab GUI 学习笔记 Ⅰ 1. Foreword Matlab 是严格意义上的编程语言吗?曾经有人告诉我他是通过 Matlab 学会了面对对象编程,我是不信的,但这依然不妨碍它在特殊领域的强 ...

  3. Matlab GUI读入图片

    % --- Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, han ...

  4. Matlab GUI程序设计入门——信号发生器+时域分析

    背景:学习matlab gui编程入门,完成一个基于GUIDE的图形化界面程序,结合信号生成及分析等. 操作步骤: 1.新建程序 新建一个GUIDE程序 这里选择第一个选项,即创建一个空白的GUIDE ...

  5. matlab GUI界面编程总结

    去年做了一些关于Matlab GUI的程序,现在又要做相关的东西,回想起来,当时很多经验没有记录下来,现在回顾起来始终觉得不爽,所以从现在开始,一定要勤写记录. 从简单的例子说起吧. 创建Matlab ...

  6. 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 ...

  7. matlab GUI工作原理

    例如,用GUIDE创建名为ceshi的GUI程序,其m文件的主函数有如下形式.那么,打开该GUI时,它到底是怎么运行的呢?以下略作小结,欢迎大家补充 function varargout = cesh ...

  8. Matlab——GUI初涉

    Matlab——GUI初涉 MATLAB GUI教学视频0:GUI中的基本操作—在线播放—优酷网,视频高清在线观看http://v.youku.com/v_show/id_XMjM2Mjk0MjM2. ...

  9. [转载] 关于matlab GUI的一点心得

    转载自 落落轻尘 [Fig文件方式,即使用菜单File->New->GUI来设计界面] 首先值得注意的是,在低版本matlab上制作的含GUI的m文件一般不能在高版本的matlab上面运行 ...

随机推荐

  1. [Http] Understand what an HTTP Request is

    Let's look at several HTTP requests to learn the basic structure of these messages, and how the vari ...

  2. NavMesh动态碰撞

    今天遇到一个问题,就是怎样处理一些动态的障碍物. NavMesh是能够躲避静态的障碍物.NavMeshObstacle的作用就是动态添加障碍. 可是有个问题,NavMeshObstacle是圆,连椭圆 ...

  3. jquery平滑滚动页面

    滚动到顶部 $('.scroll_top').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);}); 滚动到指定位置 ...

  4. Spark源代码阅读笔记之DiskStore

    Spark源代码阅读笔记之DiskStore BlockManager底层通过BlockStore来对数据进行实际的存储.BlockStore是一个抽象类,有三种实现:DiskStore(磁盘级别的持 ...

  5. [React] Understand React.Children Utilities

    The data contained in this.props.children is not always what you might expect. React provides React. ...

  6. oracle dual表

    dual是个虚表,其仅仅有一列. 当查询时间或者日期这些对象的时候就须要使用这个表. 比如: select sysdate from dual; 由于在oracle其中,查询语句必需要有keyword ...

  7. [Angular] Using directive to create a simple Credit card validator

    We will use 'HostListener' and 'HostBinding' to accomplish the task. The HTML: <label> Credit ...

  8. nopCommerce 3.9 接口笔记

    接口笔记 Nop.Services.Configuration ISettingService : 配置接口(查看) Nop.Services.Localization ILocalizationSe ...

  9. Android有用的任务管理器—tractor

    在平时的android开发工作中,我们常常须要运行耗时操作,有时为了用户体验还须要显示个等待框,我之前的做法都是开一个线程,然后用handler发消息进行显示和关闭等待框以及相关的ui操作.假设任务比 ...

  10. 关于使用Timer定时监测网络是否ping通

    项目需要连接某台具体服务端,如果连不上则实时提示,开始使用Timer实时检测 void timer_Tick(object sender, EventArgs e) { Ping pingSender ...