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

📄 split_line.m

📁 实现地震勘探中
💻 M
字号:
function comp=split_line(str)% Find the separators ".", ":" and "|" in the input string and split it into up% to four cells% For internal use in LAS readers%% Written by: E. R.: December 16, 2006% Last updated:% %        comp=split_line(str)% INPUT% str    string to split into components% OUTPUT% comp   cell vector with up to four components resulting from the split;%        empty in case of an errorcomp=cell(1,4);idx=strfind(str,'.');comp{1}=strtrim(str(1:idx(1)-1));idx2=strfind(str,':');comp{2}=str(idx(1)+1:idx2(1)-1);idx3=strfind(str,'|');if ~isempty(idx3)   comp{3}=strtrim(str(idx2(1)+1:idx3(1)-1));   comp{4}=strtrim(str(idx3(1)+1:end));else   comp{3}=strtrim(str(idx2(1)+1:end));end

⌨️ 快捷键说明

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