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. 编程算法 - 远征队(expedition) 代码(C)

    远征队(expedition) 代码(C) 本文地址: http://blog.csdn.net/caroline_wendy 题目: 远征队有一辆卡车须要行驶L单位的距离, 開始时, 车上有P单位的 ...

  2. angular内置指令相关知识

    原文地址 https://www.jianshu.com/p/5a5b43a8e91f 大纲 1.angular指令的分类 2.angular指令之——组件 3.angular指令之——属性指令 (n ...

  3. Hadoop配置文件 分类: A1_HADOOP 2014-08-19 12:48 1157人阅读 评论(1) 收藏

    部分内容参考:http://www.linuxqq.net/archives/964.html  http://slaytanic.blog.51cto.com/2057708/1100974/ ha ...

  4. 嵌入式平台下的ldd

    x86平台有ldd可以很方便的查看对库的依赖关系,但在嵌入式linux环境中没有这个命令,替而代之是 CC=$(CROSS_COMPILE)gcc LDD=$(CROSS_COMPILE)readel ...

  5. [Javascript] Create scrollable DOM elements with Greensock

    In this lesson, we will look at Greensock's Draggable API. We will implement a scrollable <div> ...

  6. [Angular Directive] Create a Template Storage Service in Angular 2

    You need to define a <template> to be able to use it elsewhere in your app as a TemplateRef. Y ...

  7. PHP移动互联网开发笔记(8)——MySQL数据库基础回顾[2]

    一.数据表 为了确保数据的完整性和一致性,在创建表时指定字段名称,字段类型和字段属性外,还需要使用约束(constraint),索引(index),主键(primary key)和外键(foregin ...

  8. WPF中自动增加行(动画)的TextBox

    原文:WPF中自动增加行(动画)的TextBox WPF中自动增加行(动画)的TextBox WPF中的Textbox控件是可以自动换行的,只要设置TextWrapping属性为"Wrap& ...

  9. oracle中imp导入数据中文乱码问题(转)

    (转自  http://blog.chinaunix.net/uid-186064-id-2823338.html) oracle中imp导入数据中文乱码问题 用imp命令向oracle中导入数据后, ...

  10. 在erlang项目中使用protobuf

    在erlang项目中使用protobuf http://blog.csdn.net/mycwq/article/details/21864191 protobuf是google的一个序列化框架,类似X ...