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

📄 istype.m

📁 地震、测井方面matlab代码,解释的比较详细
💻 M
字号:
function bool=istype(structure,typ)
% Check if structure has field "type" and that it is set to "typ"
% Written by: E. R.: September 1, 2003
%
%    bool=istype(structure,typ)
% INPUT
% structure  Matlab structure
% typ        string
% OUTPUT
% bool       logical variable; set to logical(1) if "structure has field "type"
%            and if it is set to "typ"
%            otherwise it is set to logical(0)

bool=logical(0);
if isstruct(structure)
   if isfield(structure,'type')
      if strcmp(structure.type,typ)
         bool=logical(1);
      end
   end
end

⌨️ 快捷键说明

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