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

📄 1huitu1.txt

📁 一个GUI程序
💻 TXT
字号:
close all;
axes('position',[0.11,0.05,0.8,0.4])
T0=uicontrol(gcf,'style','text','unit','normalized','position',... 
   [0.03,0.95,0.8,0.04],'BackgroundColor',[0.8 0.8 0.8],...
   'HorizontalAlignment','left',... 
   'ForegroundColor','m','fontsize',10,'string',...
   'Please type names and values for calculation in following two collumn');
T1=uicontrol(gcf,'style','text','unit','normalized','position',... 
   [0.03,0.9,0.2,0.04],'BackgroundColor',[0.9 0.9 0.9],... 
   'ForegroundColor','b','fontsize',10,'string','name of variables');
T2=uicontrol(gcf,'style','text','unit','normalized','position',... 
   [0.24,0.9,0.2,0.04],'BackgroundColor',[0.9 0.9 0.9],... 
   'ForegroundColor','b','fontsize',10,'string','value of variables');
N1=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.03,0.82,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','b','fontsize',10);
V1=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.24,0.82,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','r','fontsize',10,'callback',...
   'kk=eval(get(V1,''string''));eval([get(N1,''string''),''=kk;'']);');
N2=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.03,0.74,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','b','fontsize',10);
V2=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.24,0.74,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','r','fontsize',10,'callback',...
   'kk=eval(get(V2,''string''));eval([get(N2,''string''),''=kk;'']);');
N3=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.03,0.66,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','b','fontsize',10);
V3=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.24,0.66,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','r','fontsize',10,'callback',...
   'kk=eval(get(V3,''string''));eval([get(N3,''string''),''=kk;'']);');
N4=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.03,0.58,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','b','fontsize',10);
V4=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.24,0.58,0.2,0.05],'BackgroundColor','w',... 
   'ForegroundColor','r','fontsize',10,'callback',...
   'kk=eval(get(V4,''string''));eval([get(N4,''string''),''=kk;'']);');
T3=uicontrol(gcf,'style','text','unit','normalized','position',... 
   [0.03,0.53,0.8,0.04],'BackgroundColor',[0.8 0.8 0.8],...
   'HorizontalAlignment','left',... 
   'ForegroundColor','m','fontsize',10,'string',...
   'Please input the expression in the following blank');
E3=uicontrol(gcf,'style','edit','unit','normalized','position',... 
   [0.03,0.48,0.8,0.05],'BackgroundColor','w',...
   'HorizontalAlignment','left',... 
   'ForegroundColor','k','fontsize',10,'callback',...
   'S=get(E3,''string'');');
uicontrol(gcf,'style','push','unit','normalized','position',... 
   [0.46,0.58,0.4,0.05],'BackgroundColor','y',...
   'HorizontalAlignment','left','string','draw or plot data',... 
   'ForegroundColor','k','fontsize',10,'callback',...
   ['P1=eval(S);if length(P1)==1;text(mean(xlim),mean(ylim),',...
       '[''P1='',num2str(P1)]);else plot(P1);end;']);

⌨️ 快捷键说明

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