gendialog.m

来自「这是一个基于WCDMA系统的 MIMO-OFDM下行链路的仿真模型。」· M 代码 · 共 68 行

M
68
字号
function fig = GenDialog(s1)
%********************************************************************************
%function fig = GenDialog(s1)
%
% Copyright 2002 The Mobile and Portable Radio Research Group
%
%Generates a dialog window which displays the string that is stored in s1
%
%Parameters
%   Input
%      s1    vector   Character string that contains the message to be displayed
%   Output
%      fig   scalar   Handle of the dialog figure
%********************************************************************************


load SFDialog

bdwidth = 5;
topbdwidth=30;

ScreenSize = get(0,'ScreenSize');
Height = 177;
Width = 400;
right = round((ScreenSize(3)-Width)/2)-2*bdwidth;
bottom = ScreenSize(4)-Height-4*topbdwidth;

%s1=sprintf('With the Spreading Factor of %d, the number of interfers cannot exceed %d!',SF,SF-2);

h0 = dialog('BackingStore','off', ...
	'ButtonDownFcn','if isempty(allchild(gcbf)), close(gcbf), end', ...
	'Color',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Colormap',mat0, ...
	'FileName','DPDCH_SFDialog.m', ...
	'HandleVisibility','callback', ...
	'IntegerHandle','off', ...
	'InvertHardcopy','off', ...
	'MenuBar','none', ...
	'NumberTitle','off', ...
	'PaperPosition',[18 180 576 432], ...
	'PaperUnits','points', ...
	'Position',[right bottom Width Height], ...
	'Resize','off', ...
	'Tag','Fig1', ...
   'ToolBar','none', ...
	'WindowStyle','modal');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'FontSize',12, ...
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[31.5 65.25 252 44.25], ...
	'String',s1, ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.615686274509804 0.725490196078431 0.784313725490196], ...
	'Callback','close(gcf)', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[135 25.5 51 24], ...
	'String','OK', ...
	'Tag','Pushbutton1');
if nargout > 0, fig = h0; end

⌨️ 快捷键说明

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