This commit is contained in:
biss committed 2025-10-24 11:42:36 +08:00
1 parent 513e92c60c
commit 3907fdf5b1
7 files changed
+38

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
pbstart=uicontrol(gcf,"Style","pushbutton","Position",[50,5,60,25],"String","Start Plot","Callback",...
"t=-pi:pi/20:2*pi;plot(t,sin(t))");
ptgrid=uicontrol(gcf,"Style","togglebutton","Position",[150,5,60,25],...
"String","Grid","Callback",'grid');
+9
View File
@@ -0,0 +1,9 @@
set(gcf,'Color','R');
htext=uicontrol(gcf,"Style","text","String","Color Option","Position",[200,130,150,20]);
% 单选
hr=uicontrol(gcf,"Style","radiobutton","String","Red","Position",[200,100,150,25],"Value",1,...
"Callback",['set(hr,''Value'',1);','set(hb,''Value'',0);','set(hy,''Value'',0);','set(gcf,''Color'',''R'')']);
hb=uicontrol(gcf,"Style","radiobutton","String","Blue","Position",[200,75,150,25],"Value",0,...
"Callback",['set(hr,''Value'',0);','set(hb,''Value'',1);','set(hy,''Value'',0);','set(gcf,''Color'',''B'')']);
hy=uicontrol(gcf,"Style","radiobutton","String","Yellow","Position",[200,50,150,25],"Value",0,...
"Callback",['set(hy,''Value'',0);','set(hb,''Value'',0);','set(hy,''Value'',1);','set(gcf,''Color'',''Y'')']);
+11
View File
@@ -0,0 +1,11 @@
htxt=uicontrol(gcf,"Style","text","Position",[200,125,150,25],"String","Set Window Properties");
hp=uicontrol(gcf,"Style","checkbox","Position",[200,100,150,25],"String","My Position",...
"Callback",["set(gcf,""Position"",[10,10,300,250];",...
"if get(hp,""Value"")==1,",...
"set(gcf,""Position"",[10,10,600,500]),",'end']);
hc=uicontrol(gcf,"Style","checkbox","Position",[200,75,150,25],"String","My Color",...
"Callback",["set(gcf,""color"",""w"");","if get(hc,""Value"")==1,","set(gcf,""color"",g]","end"]);
hn=uicontrol(gcf,"Style","checkbox","Position",[200,50,150,25],"String","My Name",...
"Callback",["set(gcf,""Name"",""未选择"";",...
"if get(hn,""Value"")==1,",...
"set(gcf,""Name"",""未选择"")","end");
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff. Show more