split_units_values.m
来自「实现地震勘探中」· M 代码 · 共 28 行
M
28 行
function comp=split_units_values(str)% Find the first blank in the input string and split into two cells% (before and after the string); remove leading and trailing blanks% For internal use in LAS readers%% Written by: E. R.: December 17, 2006% Last updated:% % comp=split_units_values(str)% INPUT% str string to split into components% OUTPUT% comp cell vector with two components resulting from the split;% empty in case of an errorcomp=cell(1,2);temp=strfind(str,' ');if isempty(temp) comp{1}=str;elseif temp(1) == 1 % No units comp{2}=strtrim(str);else comp{1}=strtrim(str(1:temp(1)-1)); comp{2}=strtrim(str(temp(1)+1:end));end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?