⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_slider.m

📁 基本的matlab编程源代码
💻 M
字号:
function test_slider()
% This function creates a slider and a text field.
% The the associated callback will cause the value 
% of the slider to be displayed in the text field.

h0 = figure('Color',[0.8 0.8 0.8], ...
   'Name','Test Slider', ...
   'NumberTitle','off', ...
   'Position',[300 300 257 136], ...
   'Tag','Fig1');
h1 = uicontrol('Parent',h0, ...
   'Units','points', ...
   'BackgroundColor',[0.8 0.8 0.8], ...
   'Position',[45 45 70 17], ...
   'String','0.00', ...
   'Style','text', ...
   'Tag','Label1');
h1 = uicontrol('Parent',h0, ...
   'Units','points', ...
   'Callback','test_slider_callback', ...
   'Max',10, ...
   'Min',0, ...
   'Position',[45 25 70 17], ...
   'String','test', ...
   'Style','slider', ...
   'Value',0, ...
   'Tag','Popup1');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -