📄 button_clicked.m
字号:
function button_clicked
% Declare and initialize variable to store the count
persistent count
if isempty(count)
count = 0;
end
% Update count
count = count + 1;
% Create new string
str = sprintf('Total Clicks: %d',count);
% Find the text field and update the text
Hndl = findobj(gcbf,'Tag','StaticText1');
set (Hndl,'String',str);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -