使用 textscan 将制表位读取为 4 个空格
reading tabstops as 4 whitespaces using textscan
是否可以告诉 MATLAB 的 textscan
将制表符导入为四个空格?目前它只用一个空格替换制表符:
raw = textscan(fid,'%s','Delimiter','\n','Whitespace','');
提前谢谢你:)
谢谢@Dev-iL,
我想也许有一些选项可以添加到 textscan,但现在我按照你的建议添加了另一行代码:
raw = textscan(fid,'%s','Delimiter','\n','Whitespace','');
raw = regexprep(raw{1},'\t',' ');
是否可以告诉 MATLAB 的 textscan
将制表符导入为四个空格?目前它只用一个空格替换制表符:
raw = textscan(fid,'%s','Delimiter','\n','Whitespace','');
提前谢谢你:)
谢谢@Dev-iL,
我想也许有一些选项可以添加到 textscan,但现在我按照你的建议添加了另一行代码:
raw = textscan(fid,'%s','Delimiter','\n','Whitespace','');
raw = regexprep(raw{1},'\t',' ');