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

📄 mtimes.m

📁 基于Matlab的地震数据处理显示和测井数据显示于处理的小程序
💻 M
字号:
function ds=mtimes(i1,i2)% Function multiplies a constant or matrix to traces of seismic dataset % Written by: E. R.: September 11, 2005% Last updated:if isstruct(i1)  &  strcmp(i1.type,'seismic')  &  isnumeric(i2)   ds=i1;   sz=fliplr(size(i2));	% Must be the transposed of the trace matrix   [nsamp,ntr]=size(i1.traces);   if prod(sz) == 1      ds.traces=ds.traces*i2;   else      if all(sz == [1,ntr])         for ii=1:nsamp            ds.traces(ii,:)=ds.traces(ii,:)*i2;         end            elseif all(sz == [nsamp,1])         for ii=1:ntr            ds.traces(:,ii)=i2*ds.traces(:,ii);         end            elseif all(sz == [nsamp,ntr])         ds.traces=ds.traces.*i2;            else         error('Operator "*" is not defined for this size of matrix.')            end   end            elseif  isstruct(i2)  &  strcmp(i2.type,'seismic')  &  isnumeric(i1)   ds=i2;   sz=fliplr(size(i1));  % Must be the transposed of the trace matrix   [nsamp,ntr]=size(i2.traces);   if prod(sz) == 1   |  all(sz == [nsamp,ntr])      ds.traces=ds.traces*i1;   else      if all(sz == [1,ntr])         for ii=1:nsamp            ds.traces(ii,:)=ds.traces(ii,:)*i1;         end            elseif all(sz == [nsamp,1])         for ii=1:ntr            ds.traces(:,ii)=i1*ds.traces(:,ii);         end      else         error('Operator "*" is not defined for this size of matrix.')            end   end            else   error('Operator "*" is not defined for these arguments.')endif prod(sz) ~= 1   s_check(ds)  % Check if the seismic dataset still satisfies all requiremnetsend

⌨️ 快捷键说明

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