nextchannelcallback.m

来自「对WCDMA的性能进行了仿真」· M 代码 · 共 61 行

M
61
字号
%************************************************************
%
% Copyright 2002 The Mobile and Portable Radio Research Group
%
% Part of GUI for downlink simulator.
% Invokes the appropriate menu when the NEXT button 
% of the Channel Configuration menu is pressed
%
%************************************************************
global DelayHandle AmpHandle EbNoHandle VelocityHandle

SimConfig.EbNo_dB = str2num( get(EbNoHandle,'String') );
SimConfig.Velocity = str2num( get(VelocityHandle,'String') );

if isempty(SimConfig.EbNo_dB)
   GenDialog('The EbNo field must have a numeric value!!');
   return
end

if isempty(SimConfig.Velocity)
   GenDialog('The velocity field must have a numeric value!!');
   return
end

if SimConfig.Velocity < 0
   GenDialog('The velocity field cannot be negative!!');
   set(VelocityHandle,'String','0');
   SimConfig.Velocity = 0;
   return
end


Delay = str2num( get(DelayHandle(1),'String') ) * 1e-9;
Amp = str2num( get(AmpHandle(1),'String') );

if isempty(Delay)
   GenDialog('The first Delay field cannot be empty!!');
elseif isempty(Amp)
   GenDialog('The first Amp field cannot be empty!!');
else
   for k=2:6
      TempDelay = str2num( get(DelayHandle(k),'String') ) * 1e-9;
      TempAmp = str2num( get(AmpHandle(k),'String') );
      if (~isempty(TempDelay))
         Delay(k) = TempDelay;
         Amp(k) = TempAmp;
      end
   end
   SimConfig.Delays = Delay;
   SimConfig.Amplitudes = Amp;
   
   close;
   SimMenu(SimConfig);
end


   
      
   

⌨️ 快捷键说明

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