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

📄 l_rename.m

📁 实现地震勘探中
💻 M
字号:
function wlog=l_rename(wlog,varargin)% Function replaces one or more curve mnemonics by new ones% The function also works with structure arrays.% See also: l_curve with option "rename"% Written by: E. R.: December 24, 2000% Last updated: November 8, 2004: update also field "curve_types (if it exists).                %%          wlog=l_rename(wlog,varargin)% INPUT% wlog     log structure or structure array% varargin  two-element cell arrays. The first element is a string representing an existing%          curve mnemonic, the second is the desired curve mnemonic. If S4M.case_sensitive == 0, the%          existing curve mnemonic is not case sensitive.% OUTPUT% wlog   log structure or structure array with the new header mnemonics%% EXAMPLE%       wlog=l_data;%       wlog=l_rename(wlog,{'DTP','DT'},{'RHO','rhob'})  % Change 'DT' to 'DTP' and 'RHOB' to 'rho'%       l_curve(wlog)%       presets              % Resore original default valuesglobal S4Mfor kk=1:length(wlog)   for ii=1:length(varargin)      mnems=varargin{ii};      if size(mnems) ~= 2         disp(mnems)         error(' Input arguments: old and new header mnemonic must be represented as a two-element cell')      end      idx=curve_index1(wlog(kk),mnems{1});      %		Check if new mnemonic already exists      wlog(kk).curve_info(idx,1)=mnems(2);      wlog(kk).curve_info=description_substitution(wlog(kk).curve_info);      if isfield(wlog(kk),'curve_types')         if S4M.case_sensitive            idx=find(ismember(wlog(kk).curve_types(:,1),mnems{1}));         else            idx=find(ismember(lower(wlog(kk).curve_types(:,1)),lower(mnems{1})));         end         if ~isempty(idx)            wlog(kk).curve_types(idx,1)=mnems(2);         end      end      ier=l_check(wlog(kk));      if ier         alert('Possible inconsistency in the well log')      end      end   end

⌨️ 快捷键说明

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