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

📄 gui_lc.m

📁 这是盲信号的代码 都已经通过编译了 做这方面的同仁可以参考一下 我觉得蛮惯用的
💻 M
字号:
function gui_lc (action)
%
% This file is used by FASTICAG

% This file holds the callbacks for load-dialog

% @(#)$Id: gui_lc.m,v 1.4 2003/09/11 12:01:19 jarmo Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Global variables

% Handle to the window
global hf_mud_Load;

% Handles to some of the controls in window
global he_mud_file;

% Needed handles from the main figure
global ht_mud_mixedStatus;

% Needed handles from the advOpt figure
global hb_mud_initGuess;
global ht_mud_initGuess;
global hpm_mud_initState;

% The needed main variables
global g_mud_mixedsig;
global g_mud_mixedmean;

% What is the load type of load dialog
global g_mud_loadType;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This should not take long...
watchonInFigure = watchon;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch action
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 'Load'
 
 varName = get(he_mud_file, 'String');      % The name of the variable to be loaded
 command=['evalin(''base'',''assignin(''''caller'''',''''data'''',' varName ')'')'];
 eval(command,'fprintf(''Variable not found in MATLAB workspace, data not loaded!\n'');data=[];');                          % Variable is copyed to 'data'
 if length (size (data)) > 2,
   fprintf (['Input data can not have more than two dimensions, data' ...
	     ' not loaded.\n']);
   data = [];
 end

 if any (any (isnan (data))),
   fprintf ('Input data contains NaN''s, data not loaded.\n');
   data = [];
 end


 if isempty(data)  % if there was no name given...
   watchoff (watchonInFigure);
   % There used to be a 'break' statement here, but it resulted in
   % errors in more recent version of Matlab -- jarmo
   return;
 end
 
 switch g_mud_loadType
  case  'data'                                % New data
   g_mud_mixedsig = data;
   if ~isa (g_mud_mixedsig, 'double')
     fprintf ('Warning: converting input data into regular (double) precision.\n');
     g_mud_mixedsig = double (g_mud_mixedsig);
   end

   set(ht_mud_mixedStatus, 'String', '');
   g_mud_mixedmean = [];                 % New data - so that means ...
   gui_cb NewData;                             
   
  case 'guess'                                % New initial guess
   set(hb_mud_initGuess, 'UserData', data);     % Since we loaded new initial
   set(ht_mud_initGuess, 'String', 'Loaded');   % guess, we wan't to use it too
   set(hpm_mud_initState, 'Value', 2);          % ... set initState to 'guess'
 end

 close(hf_mud_Load);                       % close the dialog

 % Use return to avoid reaching the watchoff statement at the end
 % (There used to be a 'break' statement here, but it resulted in
 % errors in more recent version of Matlab -- jarmo)
 return;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 'Cancel'
 
 close(hf_mud_Load);                       % do nothing just exit

 % Use return to avoid reaching the watchoff statement at the end
 % (There used to be a 'break' statement here, but it resulted in
 % errors in more recent version of Matlab -- jarmo)
 return;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 'Help'

 % Which help do we show?
 switch g_mud_loadType
  case 'data'
   gui_help('gui_lc_data');
  case 'guess'
   gui_help('gui_lc_guess');
 end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end    % switch

watchoff (watchonInFigure);

⌨️ 快捷键说明

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