Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Checking whether the word in .txt are also in .txt
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How do you check if the words in the email.txt are in the lists.txt. Also there are some misspelled words in email.txt so I have to print out misspelled words.
Using elementary functions (fopen, fclose, fgetl, ischar, isempty, lower, find, strcmp, intersect, max, length, sort, input, str2num, fprintf, etc..)
% read in the lists.txt
fid=fopen('lists.txt');
while 1
tline = fgetl(fid);
if ~ischar(tline), break, end
disp(tline)
end
fclose(fid);
% read in the email
fid=fopen('email.txt');
while 1
tline = fgetl(fid);
if ~ischar(tline), break, end
disp(tline)
end
1 Kommentar
Walter Roberson
am 24 Feb. 2013
How does this differ from your earlier question at www.mathworks.co.uk/matlabcentral/answers/64602 ?
Antworten (1)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!