发布信息

怎么经常使用matlab的gui做绘图界面 (怎么经常使用银行卡)

     2024-08-12 13:09:17     901

本文目录导航:

怎么经常使用matlab的gui做绘图界面

关上matlab之后,新建一个Graphical User Interface(GUI);选用自动的Blank GUI(Default),点击ok,之后进入GUI界面编辑界面,左边的侧边栏为界面的一些快捷按钮,按住鼠标左键可以拖到右侧编辑框,各个按钮普通都有自己作用,把按钮拖过去,图为各种按钮表示;按自己的须要选用按钮并排版在未搁置按钮区域右键选用Editor进入代码编辑界面,在按钮的对应区域添加自己的代码,点击上面绿色三角(或按F5)运转,调试经过9调试经过即可保留.m文件以及文件即可

MATLAB图形用户界面设计疑问?

将这些复制到matlab,新建脚本运转就可以了

function [] = GUI1()

= figure(units, pixels, ...

position, [100 100 800 600], ...

menubar, none, ...

name, GUI_13, ...

numbertitle, off, ...

resize, off);

% 滑动条

= uicontrol(style, slide, ...

unit, pix, ...

position, [20 10 260 30], ...

min, 1, max, 100, val, 50); % min max 为滚动条频率的范围

% 显示框

= uicontrol(style, edit, ...

unit, pix, ...

position, [20 50 260 30], ...

fontsize, 16, ...

string, 50);

= axes(units, pixels, ...

position, [50 150 600 400]);

set([, ], call, {@ed_call, S}); % Shared Callback.

function [] = ed_call(varargin)

% Callback for the edit box and slider.

[h, S] = varargin{[1, 3]}; % Get calling handle and structure.

switch h% Who called?

L = get(, {min, max, value}); % Get the sliders info.

E = str2double(get(h, string)); % Numerical edit string.

if E >= L{1} && E <= L{2}

怎么经常使用matlab的gui做绘图界面

set(, value, E)% E falls within range of slider.

set(h, string, L{3})% User tried to set slider out of range.

% 失掉以后频率

f0 = get(, value);

% 开局绘图

t = linspace(0,2, 1000);

plot(, t, cos(2*pi*f0*t), -r)

set(, string, get(h, value))% Set edit to current slider.

% 失掉以后频率

f0 = get(, value);

% 开局绘图

t = linspace(0,2, 1000);

plot(, t, cos(2*pi*f0*t), -r)

% Do nothing, or whatever.

matlab软件在哪些行业有运行

MATLAB的运行畛域十分宽广,典型的运行举例如下: (1) 数据剖析; (2) 数值与符号计算; (3) 工程与迷信绘图; (4) 管理系统设计; (5) 航天工业; (6) 汽车工业; (7) 动物医学工程; (8) 语音解决; (9) 图像与数字信号解决; (10) 财务、金融剖析; (11) 建模、仿真及样机开发; (12) 新算法钻研开发; (13) 图形用户界面设计。

matlab重要是用来启动迷信运算的,当你要用到工程数学类的疑问或许仿真等等时,matlab是你很好的帮手。

matlab蕴含的范围很广,所有学完不事实,上手还是很便捷的

相关内容 查看全部