MATLAB: How to detect a “tab” character in a line of text read by fgetl

detecting special charactersfgetlreading text filesspecial characterstab characterwhitespace

I am using fgetl to read lines in a text file. Is there a way to detect whether one of the whitespace characters is a "tab" ?
Thanks in advance for your help.

Best Answer

l=fgetl(fid);
istab=(l==9); % the fast way...
%
istab=strfind(l,char(9)); % the char() string string functions way