To delete rows with a specified string, I read
http://www.mathworks.com/matlabcentral/answers/34567-remove-row-with-matching-string
I did but failed.
text.txt looks like
123 A omit B
2323 C omit D
333 oh
And I coded
fid = fopen('text.txt');
tttt = textscan(fid, '%s %s','delimiter','\t','HeaderLines',0)
tttt(strcmp(tttt{2}, 'omit'), :) = []
strcmp(tttt{2}, 'omit')
But MatLab showed me "Empty cell array: 0-by-3" and
ans =
0
0
0
I guess the type of file "tttt" is wrong (because I had to write "tttt{2}" rather than tttt(:,2)) but I am not sure.