rectimecb.m

来自「基于matlab的反演程序,用于地球物理勘探中射线追踪及偏移成像程序.」· M 代码 · 共 2 行

M
2
字号
function rectimecb(action)
% Determine the parameter for the reciprocal time difference function
if( nargin < 1 )
   action = 'init';
end

if( strcmp(action,'init'))
   q=str2mat('Reciprocal time check on which shot pairs ?',...
             'Enter the shot pair if "all" is not selected:',...
             'Identify the shot pairs having a reciprocal time check difference over (ms)?');

   a=str2mat('all|shot pair (i,j)','10 15','5');
   askthingsinit('rectimecb(''answer'')',q,a,[1 0 1],'Parameter for the Reciprocal time check');
elseif( strcmp(action,'answer'))
   a=askthingsfini;
   [strings tmp] = size(a);
   if( strcmp(deblank(a(1,:)), 'all') )
      rtrange = 0;
   else
      rtrange = 1;
   end
   refdata('set','rtrange',rtrange);

   disprectimem = refdata('get','disprectimem');
   set(disprectimem,'enable','on');

   rtpair = sscanf(a(2,:), '%d %d')
   rtpair1 = rtpair(1);
   rtpair2 = rtpair(2);
   refdata('set', 'rtpair1', rtpair1 );
   refdata('set', 'rtpair2', rtpair2 );

   mint = str2num(a(3,:));
   refdata('set', 'mint', mint);
   fbcoord = refdata('get','fbcoord');
   shotcoord = refdata('get','shotcoord');
   fbtime = refdata('get','fbtime');
   nshots = refdata('get','nshots');

   % Call the reciprocal time difference function
   [diffmat]=rectime(rtrange,rtpair1,rtpair2,fbcoord,shotcoord,fbtime,mint,nshots);
 
   % Only save the diffmatrix if all shot pairs have been computed
   if( rtrange == 0 )
      refdata('set','diffmat',diffmat);
   end
end








⌨️ 快捷键说明

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