matlab设计GUI
发布网友
发布时间:2022-04-19 21:10
我来回答
共3个回答
热心网友
时间:2023-06-25 06:13
建个m文件,输入以下代码,试试看,调整一下大小,调整以下文件,运行就可以了,不需要用新建gui的过程。。
clf reset % <1>
set(gcf,'unit','normalized','position',[0.1,0.4,0.85,0.35]);
set(gcf,'defaultuicontrolunits','normalized');
set(gcf,'defaultuicontrolfontsize',11);
set(gcf,'defaultuicontrolfontname','隶书');
set(gcf,'defaultuicontrolhorizontal','left');
set(gcf,'menubar','none');
str='调出指定图片';
set(gcf,'name',str,'numbertitle','off');
h_axes=axes('position',[0.05,0.15,0.45,0.70],'visible','off');
hpush=uicontrol(gcf,'Style','push',...
'position',[0.1,0.05,0.05,0.15],'string','图片1');
set(hpush,'callback','axes(h_axes);B=imread(''f:\1.jpg'');imshow(B)');
h_axes2=axes('position',[0.55,0.15,0.4,0.70],'visible','off');
hpush2=uicontrol(gcf,'Style','push',...
'position',[0.8,0.05,0.05,0.15],'string','图片2');
set(hpush2,'callback','axes(h_axes2);A=imread(''f:\2.jpg'');imshow(A)');
热心网友
时间:2023-06-25 06:14
添加axes控件用于显示,添加push button用于按键,在M文件里编写回调函数,显示函数格式为inshow(**)
热心网友
时间:2023-06-25 06:14
请问你还有当年的毕业设计吗?我做的课题跟你是一样的,前期的仿真编程也做完了,就差最后一步不会,需要帮忙啊,不胜感激