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

📄 sinputdlg.m

📁 时间序列分析的信号处理MATLAB工具包
💻 M
字号:
function answer=sinputdlg(prompt,title,lineNo,defaults,special)% sinputdlg - special input dialog for tstoolerror(nargchk(4,5,nargin));load secfile                           ScreenSize=get(0,'ScreenSize');FigWidth=300;FigHeight=50+50*length(prompt);FigPos(1)=(ScreenSize(3)-FigWidth)/2;FigPos(2)=(ScreenSize(4)-FigHeight)/2;FigPos(3)=FigWidth;FigPos(4)=FigHeight;if nargin<5  answer=inputdlg(prompt,title,lineNo,defaults);else  a = figure(...      'Color',[0.8 0.8 0.8], ...      'Colormap',mat0, ...      'Position',FigPos, ...      'Resize', 'on', ...      'MenuBar','none', ...      'NumberTitle','off', ...      'Name',title, ...      'Tag','sinputdlg');  for i=1:length(prompt)    d=uicontrol('Parent',a,'Style','text','Position',[5 65+50*(length(prompt)-i) 225 25],...	'HorizontalAlignment', 'left', ...	'Background',[0.8 0.8 0.8], ...	'String',prompt{i});    b(i)=uicontrol('Parent',a, ...	'Background', [1 1 1], ...	'Style','edit', ...	'HorizontalAlignment','left', ...	       	'Position',[5 50+50*(length(prompt)-i) 225 25], ...	'String', defaults{i});    if nargin==5  & special{i}      c(i)=uicontrol('Parent',a,'Style','checkbox','Position',[235 50+50*(length(prompt)-i) 60 25], ...	  'HorizontalAlignment', 'left', ...	  'Background',[0.8 0.8 0.8], ...	  'String',special{i},'Value',defaults{length(prompt)+i});    end	   end  d=uicontrol('Parent',a,'Style','pushbutton','Position',[5 5 50 25],'String','Cancel',...              'Callback','uiresume');  d=uicontrol('Parent',a,'Style','pushbutton','Position',[245 5 50 25],...              'String','Ok',...	      'Callback','set(gcbo,''UserData'',1);uiresume');	 	         uiwait; answer={}; if get(d,'UserData')   for i=1:length(prompt)     answer{i}=get(b(i),'String');        end   if nargin==5     for i=1:length(prompt)       answer{i+length(prompt)}=0;       if special{i}	 answer{i+length(prompt)}=get(c(i),'Value');       end     end   end endendclose(gcf);	 

⌨️ 快捷键说明

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